Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

values.d.ts Property or signature expected #78

Open
zeroedin opened this issue Mar 20, 2023 · 3 comments
Open

values.d.ts Property or signature expected #78

zeroedin opened this issue Mar 20, 2023 · 3 comments

Comments

@zeroedin
Copy link
Contributor

zeroedin commented Mar 20, 2023

Seems there is a typescript error in the definitions file for values. Was trying to usevalues.js in a new branch for RedHat-UX/red-hat-design-system#513

import code from new branch in rhds

import {
  Breakpoint2xsMax,
  BreakpointXsMax,
  BreakpointXs,
  BreakpointSmMax,
  BreakpointSm,
  BreakpointMdMax,
  BreakpointMd,
  BreakpointLgMax,
  BreakpointLg,
  BreakpointXlMax,
  BreakpointXl,
  Breakpoint2xl,
} from '@rhds/tokens/js/values.js';

Line 115 - 116 values.d.ts

export const ColorGrayExtensionsHsl : { com.redhat.ux: { order: number, description: string } };
export const ColorGrayExtensionsRgb : { com.redhat.ux: { order: number, description: string } };

Error: Cannot redeclare block-scoped variable 'ux'.ts(2451)

Line 328 - 333 values.d.ts

export const MediaXs : { min-width: string }; // Mobile portrait
export const MediaSm : { min-width: string }; // Mobile landscape
export const MediaMd : { min-width: string }; // Tablet portrait
export const MediaLg : { min-width: string }; // Tablet landscape
export const MediaXl : { min-width: string }; // Desktop small
export const Media2xl : { min-width: string }; // Desktop Large

Error: Cannot redeclare block-scoped variable 'min'.ts(2451)

Error output from npm run start

node_modules/@rhds/tokens/js/values.d.ts(115,41): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(115,44): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(115,51): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(115,95): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(116,41): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(116,44): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(116,51): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(116,95): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(328,26): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(328,29): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(328,35): error TS1005: ';' expected.
node_modules/@rhds/tokens/js/values.d.ts(328,44): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(329,26): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(329,29): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(329,35): error TS1005: ';' expected.
node_modules/@rhds/tokens/js/values.d.ts(329,44): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(330,26): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(330,29): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(330,35): error TS1005: ';' expected.
node_modules/@rhds/tokens/js/values.d.ts(330,44): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(331,26): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(331,29): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(331,35): error TS1005: ';' expected.
node_modules/@rhds/tokens/js/values.d.ts(331,44): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(332,26): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(332,29): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(332,35): error TS1005: ';' expected.
node_modules/@rhds/tokens/js/values.d.ts(332,44): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(333,27): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(333,30): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(333,36): error TS1005: ';' expected.
node_modules/@rhds/tokens/js/values.d.ts(333,45): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(115,41): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(115,44): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(115,51): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(115,95): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(116,41): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(116,44): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(116,51): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(116,95): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(328,26): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(328,29): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(328,35): error TS1005: ';' expected.
node_modules/@rhds/tokens/js/values.d.ts(328,44): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(329,26): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(329,29): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(329,35): error TS1005: ';' expected.
❌ [compile] Failed with exit status 2
node_modules/@rhds/tokens/js/values.d.ts(329,44): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(330,26): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(330,29): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(330,35): error TS1005: ';' expected.
node_modules/@rhds/tokens/js/values.d.ts(330,44): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(331,26): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(331,29): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(331,35): error TS1005: ';' expected.
node_modules/@rhds/tokens/js/values.d.ts(331,44): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(332,26): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(332,29): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(332,35): error TS1005: ';' expected.
node_modules/@rhds/tokens/js/values.d.ts(332,44): error TS1128: Declaration or statement expected.
node_modules/@rhds/tokens/js/values.d.ts(333,27): error TS1131: Property or signature expected.
node_modules/@rhds/tokens/js/values.d.ts(333,30): error TS1005: ',' expected.
node_modules/@rhds/tokens/js/values.d.ts(333,36): error TS1005: ';' expected.
node_modules/@rhds/tokens/js/values.d.ts(333,45): error TS1128: Declaration or statement expected.
@bennypowers
Copy link
Member

bennypowers commented Mar 20, 2023

While we're at this, we should split that module into different categories, one module for breakpoints, one module for fonts, etc

@zeroedin
Copy link
Contributor Author

While we're at this, we should split that module into different categories, one module for breakpoints, one module for fonts, etc

Agreed. I'll open a PR.

@bennypowers
Copy link
Member

Ok. Do the top-level categories as separate modules for now. We can go back later and split then up further if we need. The main thing is to lighten up the bundle size for footer

Have values.js re-export the names from the category modules. You might have to reimplement the JavaScript format, but it should be relatively straightforward, in terms of how much data and syntax to juggle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants