Perform partial inference with partially filled type parameter lists#54047
Conversation
|
@typescript-bot test this |
|
Heya @weswigham, I've started to run the extended test suite on this PR at da7b047. You can monitor the build here. |
|
Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at da7b047. You can monitor the build here. Update: The results are in! |
|
Heya @weswigham, I've started to run the tarball bundle task on this PR at da7b047. You can monitor the build here. |
|
Heya @weswigham, I've started to run the diff-based top-repos suite on this PR at da7b047. You can monitor the build here. Update: The results are in! |
|
Heya @weswigham, I've started to run the perf test suite on this PR at da7b047. You can monitor the build here. Update: The results are in! |
|
(Given how some of the tests colorize in the editor, I think this change will need a tmLanguage update, but we should maybe do that regardless of whether we take this or not for better error recovery when people are deleting/writing type argument lists) |
|
Hey @weswigham, I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
|
Heya @weswigham, I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here. |
|
@weswigham Here they are:
CompilerComparison Report - main..54047
System
Hosts
Scenarios
TSServerComparison Report - main..54047
System
Hosts
Scenarios
StartupComparison Report - main..54047
System
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hey @weswigham, the results of running the DT tests are ready. Branch only errors:Package: lodash Package: angular-odata-resources Package: hapi__joi Package: lodash/v3 Package: redux-actions Package: skatejs Package: enzyme Package: papaparse Errors that changed between main and the branch:Package: ramda Branch error: |
|
@weswigham Here are the results of running the top-repos suite comparing Something interesting changed - please have a look. Details
|
|
#26349 is once again up to date with |
|
@weswigham since partial inference by default seems to be to be off the table - do you envision any way for library authors to opt-into that in the future in their signature declarations? |
This implements what we wanted to look into a yesterday's design meeting - for expression inference sites, any number of type parameters can be provided, the rest will be inferred from the argument expressions. Likewise, you may now omit type arguments from the middle of a type argument list and have those omitted positions inferred, too.
This is just another flavor of #26349, so this will close #26349 if merged.