Skip to content

Unknown attributes #22

@hampoelz

Description

@hampoelz

I use the ts-lit-plugin for type checking of web components. Although phosphor-icons come with types, I still get a warning from the plugin that properties such as weight or size are unknown.

One possible solution would be to use the actual component class in the HTMLElementTagNameMap declaration instead of the IconAttrs type: (scripts/assemble.ts)

  declare global {
    interface HTMLElementTagNameMap {
-     "ph-${key}": IconAttrs;
+     "ph-${key}": Ph${name};
    }
  }

Another solution would be to change IconAttrs from a type to a declare class: (src/types.ts)

- export type IconAttrs = {
+ export declare class IconAttrs {

I'm not sure what the best solution is, but it would be great if this could be fixed. Then this icon library would really be more than perfect ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions