Skip to content

string literal can't be used as a type of a parameter #6991

@zpdDG4gta8XKpMCd

Description

@zpdDG4gta8XKpMCd
type Boots = 'boots';
let lala = {
    nowBoots(saying: Boots): void; // works
    nowCats(saying: 'cats'): void; // doesn't works
}

Metadata

Metadata

Labels

BugA bug in TypeScriptDomain: Literal TypesUnit types including string literal types, numeric literal types, Boolean literals, null, undefinedDuplicateAn existing issue was already created

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions