Skip to content

Fix mapped types throwing eslint errors  #43

@Brianzchen

Description

@Brianzchen
type TypographyPathifyT = {
  [key in keyof TypographyVariantsT]: string,
};

Will first produce 'key' is defined but never used.eslint[no-unused-vars](https://eslint.org/docs/latest/rules/no-unused-vars) and then using mapped types more will produce, 'key' is already defined.eslint[no-redeclare](https://eslint.org/docs/latest/rules/no-redeclare)

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