microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
98.27k stars 12.21k forks source link

Experiment: Remove lower priority from contextual signature instantiation return type inference #58321

Open andrewbranch opened 2 weeks ago

andrewbranch commented 2 weeks ago

@typescript-bot test top200

typescript-bot commented 2 weeks ago

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top200 ✅ Started
andrewbranch commented 2 weeks ago

@typescript-bot pack this

typescript-bot commented 2 weeks ago

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
pack this ✅ Started ✅ Results
typescript-bot commented 2 weeks ago

Hey @andrewbranch, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/161473/artifacts?artifactName=tgz&fileId=C723169543A40FB90A0107AC550ACF4D6B41276B124BA86254E134BF631E468F02&fileName=/typescript-5.5.0-insiders.20240425.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.5.0-pr-58321-4".;

andrewbranch commented 2 weeks ago

@typescript-bot test top200 @typescript-bot pack this

typescript-bot commented 2 weeks ago

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top200 ✅ Started 👀 Results
pack this ✅ Started ✅ Results
typescript-bot commented 2 weeks ago

Hey @andrewbranch, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/161474/artifacts?artifactName=tgz&fileId=0D50580727580C2B54AFD5A51B91EA4A6271481DD62F02A2B1CEE60EA09EF4C902&fileName=/typescript-5.5.0-insiders.20240425.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.5.0-pr-58321-7".;

typescript-bot commented 2 weeks ago

@andrewbranch Here are the results of running the top 400 repos comparing main and refs/pull/58321/merge:

Something interesting changed - please have a look.

Details

gcanti/fp-ts

**4 of 5 projects failed to build with the old tsc and were ignored** ### [tsconfig.build-es6.json](https://github.com/gcanti/fp-ts/blob/a94d4f84d346da271e0450d7341b98e0a5739a0e/tsconfig.build-es6.json) - `error TS2345: Argument of type '(a: A) => Either>' is not assignable to parameter of type '(b: B | null | undefined) => Either'.` - [src\/Either.ts\#L1427](https://github.com/gcanti/fp-ts/blob/a94d4f84d346da271e0450d7341b98e0a5739a0e/src/Either.ts#L1427) - `error TS2345: Argument of type '(a: A) => HKT>>' is not assignable to parameter of type '(b: B | null | undefined) => HKT>'.` - [src\/EitherT.ts\#L173](https://github.com/gcanti/fp-ts/blob/a94d4f84d346da271e0450d7341b98e0a5739a0e/src/EitherT.ts#L173) - `error TS2322: Type '(...eqs: { [K in keyof A]: Eq; }) => Eq>' is not assignable to type '[]>(...eqs: T) => Eq<{ [K in keyof T]: T[K] extends Eq ? A : never; }>'.` - [src\/Eq.ts\#L201](https://github.com/gcanti/fp-ts/blob/a94d4f84d346da271e0450d7341b98e0a5739a0e/src/Eq.ts#L201) - `error TS2345: Argument of type '(a: A) => Option>' is not assignable to parameter of type '(b: B | null | undefined) => Option'.` - [src\/Option.ts\#L1070](https://github.com/gcanti/fp-ts/blob/a94d4f84d346da271e0450d7341b98e0a5739a0e/src/Option.ts#L1070) - `error TS2345: Argument of type '(a: A) => HKT>>' is not assignable to parameter of type '(b: B | null | undefined) => HKT>'.` - [src\/OptionT.ts\#L136](https://github.com/gcanti/fp-ts/blob/a94d4f84d346da271e0450d7341b98e0a5739a0e/src/OptionT.ts#L136) - `error TS2322: Type '(...ords: { [K in keyof A]: Ord; }) => Ord>' is not assignable to type '[]>(...ords: T) => Ord<{ [K in keyof T]: T[K] extends Ord ? A : never; }>'.` - [src\/Ord.ts\#L420](https://github.com/gcanti/fp-ts/blob/a94d4f84d346da271e0450d7341b98e0a5739a0e/src/Ord.ts#L420) - `error TS2322: Type '(...shows: { [K in keyof A]: Show; }) => Show>' is not assignable to type '[]>(...shows: T) => Show<{ [K in keyof T]: T[K] extends Show ? A : never; }>'.` - [src\/Show.ts\#L69](https://github.com/gcanti/fp-ts/blob/a94d4f84d346da271e0450d7341b98e0a5739a0e/src/Show.ts#L69)