Skip to content

Conversation

@ahejlsberg
Copy link
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
Member Author

@typescript-bot test this
@typescript-bot user test this
@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 16, 2019

Heya @ahejlsberg, I've started to run the parallelized community code test suite on this PR at b1f746b. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 16, 2019

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 16, 2019

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

@typescript-bot
Copy link
Collaborator

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

@ahejlsberg
Copy link
Member Author

@typescript-bot test this
@typescript-bot user test this
@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 17, 2019

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 17, 2019

Heya @ahejlsberg, I've started to run the parallelized community code test suite on this PR at 3d8a9c8. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 17, 2019

Heya @ahejlsberg, I've started to run the extended test suite on this PR at 3d8a9c8. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

@ahejlsberg
Copy link
Member Author

@typescript-bot test this
@typescript-bot user test this
@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 9, 2020

Heya @ahejlsberg, I've started to run the extended test suite on this PR at 0ace61c. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 9, 2020

Heya @ahejlsberg, I've started to run the parallelized community code test suite on this PR at 0ace61c. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 9, 2020

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

@typescript-bot
Copy link
Collaborator

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

@ahejlsberg
Copy link
Member Author

@typescript-bot test this
@typescript-bot user test this
@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 9, 2020

Heya @ahejlsberg, I've started to run the parallelized community code test suite on this PR at f87aea3. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 9, 2020

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 9, 2020

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

@ahejlsberg
Copy link
Member Author

Issues in test suites are all preexisting conditions.

@ahejlsberg ahejlsberg merged commit 357f715 into master Jan 10, 2020
Kingwl pushed a commit to Kingwl/TypeScript that referenced this pull request Mar 4, 2020
microsoft#35143)

* Check combined intersection properties against target index signatures

* Add tests

* Accept new baselines

* Less aggressive check for index signatures

* Track intersection membership state for both source and target

* Minor fixes
@jakebailey jakebailey deleted the fix32484-2 branch November 7, 2022 17:34
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When creating a mapped type of an indexed type it extends too liberal

4 participants