Skip to content

Type assertion for string literals stopped working #10863

@normalser

Description

@normalser

TypeScript Version: 2.1.0-dev.20160912

Code

// A *self-contained* demonstration of the problem follows...
const types = {
    test: <'test'>'test',
    test2: 'test2' as 'test2'
} // type: {test: string, test2:string}

let a = <'test'>'test'  // type string

Probably related to: #10676

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions