unpreset / unocss-preset-theme

The dynamic theme presets for UnoCSS.
https://unocss-preset-theme.todev.cc
131 stars 11 forks source link

Typescript Issues #34

Closed acoreyj closed 1 year ago

acoreyj commented 1 year ago
    presetTheme({
      theme: {
        dark: {
          richblue: {
            100: '#7da6ff',
            200: '#598dff',
            300: '#446bc1',
            400: '#37569b',
            500: '#2a4175',
            600: '#243967',
            700: '#1c2c4f',
            800: '#0f1729',
            900: '#090e1a',
          },
        },
      },
    }),

TS ERROR

Type 'Preset<{ richblue: { 100: string; 200: string; 300: string; 400: string; 500: string; 600: string; 700: string; 800: string; 900: string; }; }>' is not assignable to type 'Preset<any> | Preset<any>[]'.
  Type 'Preset<{ richblue: { 100: string; 200: string; 300: string; 400: string; 500: string; 600: string; 700: string; 800: string; 900: string; }; }>' is not assignable to type 'Preset<any>'.
    Types of property 'rules' are incompatible.
      Type 'Rule<{ richblue: { 100: string; 200: string; 300: string; 400: string; 500: string; 600: string; 700: string; 800: string; 900: string; }; }>[] | undefined' is not assignable to type 'Rule<any>[] | undefined'.
        Type 'Rule<{ richblue: { 100: string; 200: string; 300: string; 400: string; 500: string; 600: string; 700: string; 800: string; 900: string; }; }>[]' is not assignable to type 'Rule<any>[]'.
          Type 'Rule<{ richblue: { 100: string; 200: string; 300: string; 400: string; 500: string; 600: string; 700: string; 800: string; 900: string; }; }>' is not assignable to type 'Rule<any>'.
            Type '[RegExp, DynamicMatcher<{ richblue: { 100: string; 200: string; 300: string; 400: string; 500: string; 600: string; 700: string; 800: string; 900: string; }; }>]' is not assignable to type 'Rule<any>'.
              Type '[RegExp, DynamicMatcher<{ richblue: { 100: string; 200: string; 300: string; 400: string; 500: string; 600: string; 700: string; 800: string; 900: string; }; }>]' is not assignable to type '[string, CSSObject | CSSEntries]'.
                Type at position 0 in source is not compatible with type at position 0 in target.
                  Type 'RegExp' is not assignable to type 'string'.
Dunqing commented 1 year ago

Duplicate of https://github.com/Dunqing/unocss-preset-theme/issues/33, please upgrade version to 0.7.0