Skip to content

Check all intersection constituents against index signatures in target - #34546

Closed
Anders Hejlsberg (ahejlsberg) wants to merge 4 commits into
masterfrom
fix32484
Closed

Anders Hejlsberg (ahejlsberg) wants to merge 4 commits into
masterfrom
fix32484

Conversation

@ahejlsberg

Copy link
Copy Markdown
Member

With this PR we check that all constituents of an intersection source type relate to index signatures in the target type. For example:

declare let s: { a: string } & { b: number };
declare let t: { [key: string]: string };
t = s;  // Error

Previously, no error was reported above.

Fixes #32484.

@ahejlsberg

Copy link
Copy Markdown
Member Author
@typescript-bot

TypeScript Bot (typescript-bot) commented Oct 17, 2019 •

Copy link
Copy Markdown
Contributor

Heya Anders Hejlsberg (@ahejlsberg), I've started to run the extended test suite on this PR at 63ed5b0. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot

TypeScript Bot (typescript-bot) commented Oct 17, 2019 •

Copy link
Copy Markdown
Contributor

Heya Anders Hejlsberg (@ahejlsberg), I've started to run the parallelized Definitely Typed test suite on this PR at 63ed5b0. You can monitor the build here. It should now contribute to this PR's status checks.

@ahejlsberg

Copy link
Copy Markdown
Member Author

Closing in favor of #35143.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants