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

Intersection types containing string cannot be used as an index #5739

Closed
wycats opened this issue Nov 20, 2015 · 1 comment
Closed

Intersection types containing string cannot be used as an index #5739

wycats opened this issue Nov 20, 2015 · 1 comment
Labels
Duplicate An existing issue was already created

Comments

@wycats
Copy link

wycats commented Nov 20, 2015

interface Marker {}

type Foo = string & Marker;

let x = {};
let y: Foo = "hello";

x[y] = 1;

The error is demonstrated in the TypeScript playground (http://goo.gl/STqLUU) and is still present as of the latest typescript@next.

@weswigham
Copy link
Member

Duplicates #5599

@weswigham weswigham added the Duplicate An existing issue was already created label Nov 21, 2015
@mhegazy mhegazy closed this as completed Dec 1, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants