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

type check issue #16986

Closed
pankleks opened this issue Jul 6, 2017 · 1 comment
Closed

type check issue #16986

pankleks opened this issue Jul 6, 2017 · 1 comment
Labels
Duplicate An existing issue was already created

Comments

@pankleks
Copy link

pankleks commented Jul 6, 2017

I know it's a tricky construction in begin with - but it was compiling fine before 2.4.

class Foo {
  [id: string]: { a?: number, b?: number };
  v1?: string;
}

with TSC 2.4.1, it gives me an error:
TS2411: Property 'v1' of type 'string' is not assignable to string index type '{ a?: number, b?: number }'.

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Jul 7, 2017
@RyanCavanaugh
Copy link
Member

See #16047 for details on this change

@microsoft microsoft locked and limited conversation to collaborators Jun 14, 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

2 participants