Skip to content

presetKobalte: Incorrect types being reported for the plugin #21

Description

@rafael-lua

I installed the most recent versions of unocss (0.62.2) and unocss-preset-primitives (0.0.2-beta.1), but when applying the plugin, the typescript gets mad:

Capture

My project typescript version is at 5.3.3.


Type 'Preset<object>' is not assignable to type 'PresetOrFactory<any> | PresetOrFactory<any>[]'.
  Type 'Preset<object>' is not assignable to type 'Preset<any>'.
    Types of property 'rules' are incompatible.
      Type 'Rule<object>[]' is not assignable to type 'Rule<any>[]'.
        Type 'Rule<object>' is not assignable to type 'Rule<any>'.
          Type '[RegExp, DynamicMatcher<object>]' is not assignable to type 'Rule<any>'.
            Type '[RegExp, DynamicMatcher<object>]' is not assignable to type '[string, CSSEntries | CSSObject] | [RegExp, DynamicMatcher<any>]'.
              Type '[RegExp, DynamicMatcher<object>]' is not assignable to type '[string, CSSEntries | CSSObject]'.
                Type at position 0 in source is not compatible with type at position 0 in target.
                  Type 'RegExp' is not assignable to type 'string'.ts(2322)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions