Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spec] Apparent type of string literal type should be global interface String #543

Closed
mhegazy opened this issue Aug 26, 2014 · 0 comments
Closed
Assignees
Labels
Spec Issues related to the TypeScript language specification

Comments

@mhegazy
Copy link
Contributor

mhegazy commented Aug 26, 2014

Section 3.8.1 should be augmented to say that a string literal type should have as its apparent type the interface String.

This is to enable things like:

declare function f(x: "str");
declare function f(x: String);

The new compiler is already doing this. We just need to change the spec and add a test for it.

@mhegazy mhegazy added the Spec label Aug 26, 2014
@mhegazy mhegazy added the Bug A bug in TypeScript label Mar 24, 2015
@mhegazy mhegazy added this to the TypeScript 1.6 milestone Mar 24, 2015
@mhegazy mhegazy removed the Bug A bug in TypeScript label May 27, 2015
@mhegazy mhegazy modified the milestones: TypeScript 1.7, TypeScript 1.8 Oct 9, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Spec Issues related to the TypeScript language specification
Projects
None yet
Development

No branches or pull requests

2 participants