Conversation

Zzzen

Fixes #23305

@typescript-bottypescript-bot added the For Backlog BugPRs that fix a backlog buglabel Sep 27, 2023
@typescript-bot

The TypeScript team hasn't accepted the linked issue #23305. If you can get it accepted, this PR will have a better chance of being reviewed.

@@ -2147,7 +2147,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
var deferredGlobalClassAccessorDecoratorResultType: GenericType | undefined;
var deferredGlobalClassFieldDecoratorContextType: GenericType | undefined;

var allPotentiallyUnusedIdentifiers = new Map<Path, PotentiallyUnusedIdentifier[]>(); // key is file name
var allPotentiallyUnusedOrUninitializedIdentifiers = new Map<Path, PotentiallyUnusedIdentifier[]>(); // key is file name
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will allLocalIdentifiers be a better variable name?

@ZzzenZzzen marked this pull request as draft September 27, 2023 07:36
@ZzzenZzzen marked this pull request as ready for review September 27, 2023 07:57
@fatcerberus

error on variables that are used but never uninitialized

I assume you meant “initialized” here.

@ZzzenZzzen changed the title error on variables that are used but never uninitialized error on variables that are used but never initialized Sep 27, 2023
@DanielRosenwasser

@typescript-bot pack this
@typescript-bot test this
@typescript-bot test top300
@typescript-bot user test this
@typescript-bot user test tsserver
@typescript-bot test tsserver top100
@typescript-bot perf test this

@typescript-bot

Heya @DanielRosenwasser, I've started to run the diff-based user code test suite on this PR at ff025b3. You can monitor the build here.

Update: The results are in!

@typescript-bot

Heya @DanielRosenwasser, I've started to run the regular perf test suite on this PR at ff025b3. You can monitor the build here.

Update: The results are in!

@typescript-bot

Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at ff025b3. You can monitor the build here.

@typescript-bot

Heya @DanielRosenwasser, I've started to run the diff-based user code test suite (tsserver) on this PR at ff025b3. You can monitor the build here.

Update: The results are in!

@typescript-bot

Heya @DanielRosenwasser, I've started to run the diff-based top-repos suite on this PR at ff025b3. You can monitor the build here.

Update: The results are in!

@typescript-bot

Heya @DanielRosenwasser, I've started to run the diff-based top-repos suite (tsserver) on this PR at ff025b3. You can monitor the build here.

Update: The results are in!

@typescript-bot

Hey @DanielRosenwasser, 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/157977/artifacts?artifactName=tgz&fileId=042CD02ADCF3ACCA8F8A1966AF9CB028ABA7B1793581431400BBC70BDA43B29F02&fileName=/typescript-5.3.0-insiders.20230927.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/[email protected]".;

@typescript-bot

@DanielRosenwasser Here are the results of running the user test suite comparing main and refs/pull/55887/merge:

Everything looks good!

@typescript-bot

@DanielRosenwasser Here are the results of running the user test suite comparing main and refs/pull/55887/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Unknown failure"
  • 2 instances of "Package install failed"

Otherwise...

Something interesting changed - please have a look.

Details

pyright

/mnt/ts_downloads/pyright/build.sh

  • [NEW] error TS2454: Variable 'key' is used before being assigned.
    • /mnt/ts_downloads/pyright/pyright: ../pyright-internal/src/analyzer/types.ts(906,17)
    • /mnt/ts_downloads/pyright/pyright: ../pyright-internal/src/analyzer/types.ts(935,13)
    • /mnt/ts_downloads/pyright/pyright-internal: src/analyzer/types.ts(906,17)
    • /mnt/ts_downloads/pyright/pyright-internal: src/analyzer/types.ts(935,13)
    • /mnt/ts_downloads/pyright/vscode-pyright: ../pyright-internal/src/analyzer/types.ts(906,17)
    • /mnt/ts_downloads/pyright/vscode-pyright: ../pyright-internal/src/analyzer/types.ts(935,13)
  • [NEW] error TS2454: Variable 'entry1' is used before being assigned.
    • /mnt/ts_downloads/pyright/pyright: ../pyright-internal/src/analyzer/types.ts(907,17)
    • /mnt/ts_downloads/pyright/pyright-internal: src/analyzer/types.ts(907,17)
    • /mnt/ts_downloads/pyright/vscode-pyright: ../pyright-internal/src/analyzer/types.ts(907,17)
  • [NEW] error TS2454: Variable 'entry2' is used before being assigned.
    • /mnt/ts_downloads/pyright/pyright: ../pyright-internal/src/analyzer/types.ts(936,13)
    • /mnt/ts_downloads/pyright/pyright-internal: src/analyzer/types.ts(936,13)
    • /mnt/ts_downloads/pyright/vscode-pyright: ../pyright-internal/src/analyzer/types.ts(936,13)

@typescript-bot

@DanielRosenwasser
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - node (v18.15.0, x64)
Memory used294,981k (± 0.01%)296,154k (± 0.01%)+1,173k (+ 0.40%)296,108k296,188kp=0.005 n=6
Parse Time2.63s (± 0.50%)2.63s (± 0.65%)~2.61s2.65sp=0.928 n=6
Bind Time0.83s (± 0.98%)0.83s (± 1.00%)~0.83s0.85sp=0.673 n=6
Check Time8.06s (± 0.21%)8.07s (± 0.45%)~8.01s8.11sp=0.686 n=6
Emit Time7.05s (± 0.24%)7.05s (± 0.34%)~7.02s7.08sp=0.808 n=6
Total Time18.57s (± 0.11%)18.58s (± 0.25%)~18.54s18.67sp=0.870 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used191,104k (± 0.55%)194,458k (± 1.47%)+3,354k (+ 1.75%)191,078k196,973kp=0.013 n=6
Parse Time1.35s (± 0.94%)1.34s (± 0.78%)~1.33s1.36sp=0.615 n=6
Bind Time0.73s (± 0.00%)0.73s (± 0.56%)~0.73s0.74sp=0.405 n=6
Check Time9.20s (± 0.81%)9.16s (± 0.22%)~9.13s9.19sp=0.373 n=6
Emit Time2.63s (± 0.44%)2.63s (± 0.85%)~2.59s2.65sp=0.451 n=6
Total Time13.91s (± 0.50%)13.87s (± 0.20%)~13.83s13.91sp=0.106 n=6
Monaco - node (v18.15.0, x64)
Memory used347,230k (± 0.00%)348,860k (± 0.00%)+1,630k (+ 0.47%)348,840k348,880kp=0.005 n=6
Parse Time2.46s (± 0.63%)2.46s (± 0.67%)~2.43s2.48sp=0.410 n=6
Bind Time0.94s (± 0.00%)0.94s (± 0.00%)~0.94s0.94sp=1.000 n=6
Check Time6.86s (± 0.53%)6.89s (± 0.40%)~6.84s6.91sp=0.169 n=6
Emit Time4.02s (± 0.34%)4.03s (± 0.62%)~4.00s4.07sp=0.463 n=6
Total Time14.27s (± 0.22%)14.31s (± 0.31%)~14.24s14.38sp=0.198 n=6
TFS - node (v18.15.0, x64)
Memory used302,517k (± 0.01%)303,750k (± 0.01%)+1,233k (+ 0.41%)303,715k303,784kp=0.005 n=6
Parse Time1.99s (± 1.21%)2.00s (± 0.92%)~1.97s2.02sp=0.405 n=6
Bind Time1.00s (± 0.98%)1.01s (± 1.02%)~0.99s1.02sp=0.356 n=6
Check Time6.25s (± 0.43%)6.28s (± 0.44%)~6.24s6.32sp=0.091 n=6
Emit Time3.52s (± 0.67%)3.52s (± 0.39%)~3.50s3.53sp=0.934 n=6
Total Time12.76s (± 0.21%)12.80s (± 0.30%)~12.74s12.85sp=0.054 n=6
material-ui - node (v18.15.0, x64)
Memory used470,486k (± 0.00%)474,320k (± 0.01%)+3,833k (+ 0.81%)474,247k474,402kp=0.005 n=6
Parse Time2.57s (± 0.29%)2.57s (± 0.16%)~2.56s2.57sp=0.389 n=6
Bind Time0.99s (± 0.52%)0.99s (± 0.76%)~0.98s1.00sp=0.784 n=6
Check Time16.61s (± 0.45%)16.67s (± 0.39%)~16.58s16.75sp=0.171 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time20.18s (± 0.35%)20.23s (± 0.33%)~20.14s20.32sp=0.128 n=6
xstate - node (v18.15.0, x64)
Memory used512,630k (± 0.01%)515,328k (± 0.01%)+2,698k (+ 0.53%)515,274k515,412kp=0.005 n=6
Parse Time3.27s (± 0.32%)3.27s (± 0.36%)~3.25s3.28sp=0.619 n=6
Bind Time1.55s (± 0.53%)1.55s (± 0.58%)~1.54s1.56sp=0.550 n=6
Check Time2.85s (± 0.60%)2.87s (± 0.87%)~2.84s2.91sp=0.167 n=6
Emit Time0.08s (± 7.90%)0.08s (± 5.21%)~0.07s0.08sp=0.673 n=6
Total Time7.74s (± 0.26%)7.76s (± 0.24%)+0.02s (+ 0.32%)7.75s7.80sp=0.020 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

tsserver

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,358ms (± 1.11%)2,359ms (± 1.08%)~2,325ms2,396msp=0.936 n=6
Req 2 - geterr5,345ms (± 1.47%)5,411ms (± 1.75%)~5,278ms5,526msp=0.230 n=6
Req 3 - references326ms (± 0.36%)327ms (± 0.73%)~326ms332msp=0.492 n=6
Req 4 - navto278ms (± 0.95%)275ms (± 1.18%)~272ms279msp=0.088 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo79ms (± 8.11%)87ms (± 6.92%)~75ms91msp=0.106 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,485ms (± 0.89%)2,480ms (± 0.72%)~2,467ms2,512msp=0.748 n=6
Req 2 - geterr4,126ms (± 1.94%)4,140ms (± 2.11%)~4,054ms4,232msp=0.471 n=6
Req 3 - references336ms (± 1.08%)339ms (± 1.62%)~333ms344msp=0.566 n=6
Req 4 - navto284ms (± 0.29%)284ms (± 0.41%)~283ms286msp=1.000 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo78ms (± 5.67%)82ms (± 7.39%)~76ms87msp=0.465 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,600ms (± 0.38%)2,591ms (± 0.30%)~2,582ms2,602msp=0.128 n=6
Req 2 - geterr1,679ms (± 3.38%)1,713ms (± 2.64%)~1,641ms1,758msp=0.230 n=6
Req 3 - references106ms (± 0.93%)122ms (± 8.11%)🔻+16ms (+14.60%)109ms130msp=0.004 n=6
Req 4 - navto359ms (± 0.38%)360ms (± 0.73%)~358ms365msp=1.000 n=6
Req 5 - completionInfo count2,071 (± 0.00%)2,071 (± 0.00%)~2,0712,071p=1.000 n=6
Req 5 - completionInfo302ms (± 0.88%)306ms (± 2.15%)~296ms314msp=0.222 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstateTSServer - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Startup

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
tsc-startup - node (v18.15.0, x64)
Execution time152.09ms (± 0.18%)151.99ms (± 0.16%)-0.09ms (- 0.06%)151.08ms155.83msp=0.001 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time227.68ms (± 0.16%)227.57ms (± 0.15%)-0.10ms (- 0.05%)226.16ms232.36msp=0.007 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time229.46ms (± 0.19%)229.40ms (± 0.16%)~227.94ms232.78msp=0.371 n=600
typescript-startup - node (v18.15.0, x64)
Execution time229.00ms (± 0.18%)229.05ms (± 0.16%)+0.05ms (+ 0.02%)227.44ms231.72msp=0.046 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@jakebailey

Hm, perf result indicates that adding this prop has moved Symbol into a new size class, given the memory increase.

@typescript-bot

@DanielRosenwasser Here are the results of running the top-repos suite comparing main and refs/pull/55887/merge:

Something interesting changed - please have a look.

Details

Server exited prematurely with code unknown and signal SIGABRT

Server exited prematurely with code unknown and signal SIGABRT

Affected repos

calcom/cal.comRaw error text: RepoResults7/calcom.cal.com.rawError.txt in the artifact folder

Last few requests

{"seq":728,"type":"request","command":"navto","arguments":{"searchValue":"a","maxResultCount":256}}
{"seq":729,"type":"request","command":"navto","arguments":{"searchValue":"a1R","maxResultCount":256}}
{"seq":730,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":["@PROJECT_ROOT@/apps/api/test/lib/bookings/_post.test.ts"],"openFiles":[]}}
{"seq":731,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":[],"openFiles":[{"file":"@PROJECT_ROOT@/apps/web/components/AppListCard.tsx","projectRootPath":"@PROJECT_ROOT@"}]}}

Repro steps

  1. git clone https://.com/calcom/cal.com --recurse-submodules
  2. In dir cal.com, run git reset --hard 403d08de41d964466c6979f897c7b407fb7c569c
  3. In dir cal.com, run yarn install --no-immutable --mode=skip-build
  4. Back in the initial folder, download RepoResults7/calcom.cal.com.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./cal.com ./calcom.cal.com.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

@typescript-bot

@DanielRosenwasser Here are the results of running the top-repos suite comparing main and refs/pull/55887/merge:

Something interesting changed - please have a look.

Details

apollographql/apollo-client

1 of 10 projects failed to build with the old tsc and were ignored

tsconfig.json

immich-app/immich

4 of 6 projects failed to build with the old tsc and were ignored

server/tsconfig.json

microsoft/playwright

4 of 14 projects failed to build with the old tsc and were ignored

utils/generate_types/test/tsconfig.json

microsoft/vscode

5 of 54 projects failed to build with the old tsc and were ignored

extensions/ipynb/tsconfig.json

src/tsconfig.monaco.json

src/tsconfig.tsec.json

pubkey/rxdb

8 of 10 projects failed to build with the old tsc and were ignored

config/tsconfig.types.json

tsconfig.json

snabbdom/snabbdom

test/tsconfig.json

tsconfig.json

tldraw/tldraw

1 of 5 projects failed to build with the old tsc and were ignored

apps/examples/tsconfig.json

apps/vscode/editor/tsconfig.json

apps/vscode/extension/tsconfig.json

Tonejs/Tone.js

1 of 2 projects failed to build with the old tsc and were ignored

scripts/tsconfig.build.json

video-dev/hls.js

tsconfig.json

vuejs/core

1 of 3 projects failed to build with the old tsc and were ignored

tsconfig.build.json

tsconfig.json

vuetifyjs/vuetify

4 of 7 projects failed to build with the old tsc and were ignored

packages/vuetify/tsconfig.checks.json

packages/vuetify/tsconfig.dist.json

packages/vuetify/tsconfig.json

@DanielRosenwasser

I spent a bit looking at the breaks and decided to take a break.

There was one example of a TODO which is questionable - I didn't quite understand that.

https://.com/immich-app/immich/blob/0a22e64799435a6ddf668733fab82da542e495f9/server/src/immich/api-v1/asset/asset.service.spec.ts#L89

For the most part, in the top 300 TypeScript projects on , the only real false negatives are variables that get assigned in a for/in or for/of loop. That seems like a bug and I'd like to rerun the tests once that's fixed.

https://.com/snabbdom/snabbdom/blob/420fa78abe98440d24e2c5af2f683e040409e0a6/src/modules/class.ts#L8-L18

https://.com/snabbdom/snabbdom/blob/420fa78abe98440d24e2c5af2f683e040409e0a6/src/modules/eventlisteners.ts#L56-L67

https://.com/snabbdom/snabbdom/blob/420fa78abe98440d24e2c5af2f683e040409e0a6/src/modules/style.ts#L29-L40

https://.com/snabbdom/snabbdom/blob/420fa78abe98440d24e2c5af2f683e040409e0a6/src/modules/style.ts#L70-L74

https://.com/microsoft/playwright/blob/c8143748e6af90df485dd46410915033b1001b73/utils/generate_types/test/test.ts#L164-L173

https://.com/microsoft/vscode/blob/c965b118a67c0f22895d2af899736d0e0aa82ffd/extensions/ipynb/src/helper.ts#L44-L58

https://.com/vuejs/core/blob/b8fc18c0b23be9a77b05dc41ed452a87a0becf82/packages/compiler-core/src/parse.ts#L122-L123

https://.com/vuejs/core/blob/b8fc18c0b23be9a77b05dc41ed452a87a0becf82/packages/template-explorer/src/index.ts#L122-L123

https://.com/vuetifyjs/vuetify/blob/3832f737c030d2f8a12b004473879f28689dc75e/packages/vuetify/src/components/VGrid/VCol.ts#L120-L121

https://.com/vuetifyjs/vuetify/blob/3832f737c030d2f8a12b004473879f28689dc75e/packages/vuetify/src/components/VGrid/VRow.ts#L126-L127

@fatcerberus

Just to be clear: "False negative" in this context means "this should be an error but isn't", correct?

I'm a little confused by the for..in examples - why would you write let foo; for (foo in whatever) ... instead of just for (let foo in whatever) ..., unless you're intending to use the variable outside the loop.

@typescript-bot

Hey @gabritto, 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/163174/artifacts?artifactName=tgz&fileId=1B4C4A309A13E2A9D48577A04475E993BD4E3D22A5BB554494021DAA5A6D56E602&fileName=/typescript-5.6.0-insiders.20240807.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/[email protected]".;

@gabritto

@typescript-bot test it

@typescript-bot

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

CommandStatusResults
test top400✅ Started👀 Results
user test this✅ Started✅ Results
run dt✅ Started👀 Results
perf test this faster✅ Started👀 Results

@typescript-bot

Hey @gabritto, the results of running the DT tests are ready.

There were interesting changes:

Branch only errors:

Package: svelte-leafletjs
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/svelte-leafletjs/svelte-leafletjs-tests.ts
  74:66  error  TypeScript@local compile error: 
Variable 'getMap' is used before being assigned  @definitelytyped/expect

✖ 1 problem (1 error, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: raphael
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/raphael/test/raphael-tests-old.ts
  57:13  error  TypeScript@local compile error: 
Variable 'angle' is used before being assigned  @definitelytyped/expect
  58:60  error  TypeScript@local compile error: 
Variable 'angle' is used before being assigned  @definitelytyped/expect
  67:13  error  TypeScript@local compile error: 
Variable 'angle' is used before being assigned  @definitelytyped/expect
  68:53  error  TypeScript@local compile error: 
Variable 'angle' is used before being assigned  @definitelytyped/expect

✖ 4 problems (4 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: nodal
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/nodal/nodal-tests.ts
  26:9  error  TypeScript@local compile error: 
Variable 'BlogPost' is used before being assigned  @definitelytyped/expect
  36:9  error  TypeScript@local compile error: 
Variable 'BlogPost' is used before being assigned  @definitelytyped/expect
  40:9  error  TypeScript@local compile error: 
Variable 'BlogPost' is used before being assigned  @definitelytyped/expect
  44:9  error  TypeScript@local compile error: 
Variable 'BlogPost' is used before being assigned  @definitelytyped/expect
  48:9  error  TypeScript@local compile error: 
Variable 'BlogPost' is used before being assigned  @definitelytyped/expect

✖ 5 problems (5 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: rx-lite-async
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/rx-lite-async/rx-lite-async-tests.ts
   9:52  error  TypeScript@local compile error: 
Variable 'sch' is used before being assigned  @definitelytyped/expect
  15:45  error  TypeScript@local compile error: 
Variable 'sch' is used before being assigned  @definitelytyped/expect

✖ 2 problems (2 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: bluebird
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/bluebird/bluebird-tests.ts
   516:12  error  TypeScript@local compile error: 
Variable 'voidThen' is used before being assigned  @definitelytyped/expect
  1360:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1366:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1375:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1385:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1398:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1404:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1413:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1423:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1436:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1442:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1451:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1461:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1474:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1480:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1489:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1499:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect

✖ 17 problems (17 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

You can check the log here.

@typescript-bot

@gabritto Here are the results of running the user tests with tsc comparing main and refs/pull/55887/merge:

Everything looks good!

@typescript-bot

@gabritto
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15362,153~~~p=1.000 n=6
Types50,24250,242~~~p=1.000 n=6
Memory used194,593k (± 0.93%)193,504k (± 0.97%)~192,255k195,994kp=1.000 n=6
Parse Time1.95s (± 0.60%)1.95s (± 1.30%)~1.93s1.99sp=0.743 n=6
Bind Time1.06s (± 1.39%)1.05s (± 1.55%)~1.03s1.07sp=0.615 n=6
Check Time13.98s (± 0.34%)13.97s (± 0.39%)~13.89s14.03sp=0.873 n=6
Emit Time4.00s (± 1.32%)4.00s (± 0.63%)~3.95s4.02sp=0.685 n=6
Total Time20.98s (± 0.32%)20.97s (± 0.28%)~20.90s21.04sp=0.810 n=6
angular-1 - node (v18.15.0, x64)
Errors77~~~p=1.000 n=6
Symbols945,757945,757~~~p=1.000 n=6
Types410,045410,045~~~p=1.000 n=6
Memory used1,222,503k (± 0.00%)1,222,515k (± 0.00%)~1,222,430k1,222,577kp=0.378 n=6
Parse Time7.92s (± 0.43%)7.93s (± 0.58%)~7.88s7.99sp=1.000 n=6
Bind Time2.23s (± 0.23%)2.23s (± 0.37%)~2.22s2.24sp=0.929 n=6
Check Time36.24s (± 0.51%)36.27s (± 0.34%)~36.09s36.39sp=0.520 n=6
Emit Time17.81s (± 0.69%)17.81s (± 0.42%)~17.71s17.89sp=0.872 n=6
Total Time64.21s (± 0.43%)64.24s (± 0.20%)~64.05s64.37sp=0.748 n=6
mui-docs - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,487,6312,487,631~~~p=1.000 n=6
Types1,012,9531,012,953~~~p=1.000 n=6
Memory used2,493,460k (± 0.00%)2,493,494k (± 0.00%)~2,493,441k2,493,532kp=0.230 n=6
Parse Time10.94s (± 0.07%)10.98s (± 0.29%)+0.04s (+ 0.37%)10.94s11.02sp=0.028 n=6
Bind Time2.61s (± 0.54%)2.62s (± 0.24%)~2.61s2.63sp=0.180 n=6
Check Time89.42s (± 0.42%)89.24s (± 0.69%)~88.72s90.42sp=0.378 n=6
Emit Time0.33s (± 2.50%)0.33s (± 1.91%)~0.32s0.34sp=0.432 n=6
Total Time103.30s (± 0.35%)103.18s (± 0.59%)~102.70s104.34sp=0.471 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,229,2921,229,303+11 (+ 0.00%)~~p=0.001 n=6
Types264,032264,036+4 (+ 0.00%)~~p=0.001 n=6
Memory used2,526,174k (± 7.71%)2,348,495k (± 0.03%)~2,346,949k2,348,862kp=0.689 n=6
Parse Time6.07s (± 1.16%)6.01s (± 0.43%)~5.98s6.05sp=0.128 n=6
Bind Time2.23s (± 1.41%)2.25s (± 1.17%)~2.23s2.29sp=0.228 n=6
Check Time40.50s (± 0.95%)40.76s (± 0.46%)~40.63s41.14sp=0.575 n=6
Emit Time3.96s (± 0.78%)3.96s (± 1.02%)~3.90s4.01sp=0.936 n=6
Total Time52.79s (± 0.64%)53.01s (± 0.45%)~52.85s53.49sp=0.471 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,229,2921,229,303+11 (+ 0.00%)~~p=0.001 n=6
Types264,032264,036+4 (+ 0.00%)~~p=0.001 n=6
Memory used2,599,692k (±11.39%)2,541,443k (± 7.20%)~2,422,947k2,778,511kp=0.471 n=6
Parse Time7.80s (± 0.81%)7.77s (± 0.99%)~7.63s7.86sp=0.575 n=6
Bind Time2.49s (± 1.45%)2.55s (± 2.02%)~2.48s2.61sp=0.065 n=6
Check Time50.85s (± 0.74%)50.65s (± 0.83%)~49.91s51.04sp=0.575 n=6
Emit Time5.00s (± 1.10%)5.02s (± 2.06%)~4.91s5.21sp=0.936 n=6
Total Time66.17s (± 0.55%)66.02s (± 0.61%)~65.37s66.56sp=0.471 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols256,694256,705+11 (+ 0.00%)~~p=0.001 n=6
Types105,545105,549+4 (+ 0.00%)~~p=0.001 n=6
Memory used428,877k (± 0.03%)428,954k (± 0.02%)~428,795k429,086kp=0.336 n=6
Parse Time4.16s (± 0.45%)4.16s (± 0.35%)~4.14s4.18sp=0.808 n=6
Bind Time1.61s (± 1.08%)1.62s (± 1.26%)~1.58s1.64sp=0.492 n=6
Check Time22.29s (± 0.33%)22.34s (± 0.41%)~22.22s22.45sp=0.575 n=6
Emit Time2.03s (± 0.80%)2.02s (± 0.92%)~2.00s2.04sp=0.121 n=6
Total Time30.09s (± 0.25%)30.14s (± 0.30%)~30.00s30.24sp=0.686 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3568🔻+33 (+94.29%)~~p=0.001 n=6
Symbols225,018225,018~~~p=1.000 n=6
Types94,24594,249+4 (+ 0.00%)~~p=0.001 n=6
Memory used370,167k (± 0.02%)370,102k (± 0.02%)~370,025k370,177kp=0.173 n=6
Parse Time2.76s (± 0.32%)2.75s (± 0.59%)~2.73s2.77sp=0.563 n=6
Bind Time1.57s (± 1.25%)1.57s (± 1.02%)~1.55s1.59sp=0.931 n=6
Check Time15.61s (± 0.20%)15.70s (± 0.20%)+0.09s (+ 0.58%)15.67s15.74sp=0.005 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time19.94s (± 0.12%)20.01s (± 0.22%)+0.07s (+ 0.36%)19.95s20.07sp=0.016 n=6
vscode - node (v18.15.0, x64)
Errors066🔻+66 (+ ∞%)~~p=0.001 n=6
Symbols2,995,2422,995,242~~~p=1.000 n=6
Types1,032,0591,032,059~~~p=1.000 n=6
Memory used3,120,638k (± 0.00%)3,120,752k (± 0.00%)+114k (+ 0.00%)3,120,677k3,120,934kp=0.020 n=6
Parse Time17.08s (± 0.30%)17.03s (± 0.28%)~16.95s17.08sp=0.226 n=6
Bind Time5.23s (± 0.23%)5.22s (± 0.30%)~5.20s5.24sp=0.611 n=6
Check Time96.45s (± 0.59%)96.61s (± 0.16%)~96.34s96.78sp=0.470 n=6
Emit Time25.00s (± 0.60%)24.85s (± 0.41%)~24.69s24.95sp=0.128 n=6
Total Time143.76s (± 0.44%)143.72s (± 0.15%)~143.39s143.99sp=1.000 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols273,789273,789~~~p=1.000 n=6
Types111,669111,669~~~p=1.000 n=6
Memory used419,898k (± 0.02%)419,891k (± 0.02%)~419,795k420,010kp=1.000 n=6
Parse Time3.30s (± 0.45%)3.30s (± 0.30%)~3.29s3.31sp=0.796 n=6
Bind Time1.45s (± 1.01%)1.46s (± 1.53%)~1.43s1.49sp=0.626 n=6
Check Time14.49s (± 0.44%)14.53s (± 0.64%)~14.42s14.68sp=0.521 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time19.25s (± 0.32%)19.29s (± 0.60%)~19.17s19.46sp=0.630 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols538,614538,614~~~p=1.000 n=6
Types176,536176,536~~~p=1.000 n=6
Memory used481,472k (± 0.01%)481,460k (± 0.00%)~481,441k481,489kp=0.810 n=6
Parse Time4.25s (± 0.61%)4.25s (± 0.69%)~4.20s4.28sp=0.685 n=6
Bind Time1.55s (± 0.53%)1.55s (± 0.33%)~1.54s1.55sp=0.929 n=6
Check Time22.25s (± 0.30%)22.34s (± 0.35%)~22.24s22.46sp=0.124 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time28.05s (± 0.27%)28.14s (± 0.38%)~27.98s28.28sp=0.148 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@typescript-bot

@gabritto Here are the results of running the top 400 repos with tsc comparing main and refs/pull/55887/merge:

Something interesting changed - please have a look.

Details

immich-app/immich

2 of 7 projects failed to build with the old tsc and were ignored

server/tsconfig.json

microsoft/vscode

4 of 53 projects failed to build with the old tsc and were ignored

src/tsconfig.json

pubkey/rxdb

8 of 11 projects failed to build with the old tsc and were ignored

tsconfig.json

config/tsconfig.types.json

@DanielRosenwasser

@typescript-bot pack this

@typescript-bot

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

CommandStatusResults
pack this✅ Started✅ Results

@typescript-bot

Hey @DanielRosenwasser, 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/163380/artifacts?artifactName=tgz&fileId=FA4786617EC62F6D82F4F215B7B541D15CEF997545365AE0E862D7EE6C7917F502&fileName=/typescript-5.6.0-insiders.20240819.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/[email protected]".;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from my nits I think this is ready. Excited to get this into 5.7!

Sign up for free to join this conversation on . Already have an account? Sign in to comment
For Backlog BugPRs that fix a backlog bug
None yet

Successfully merging this pull request may close these issues.

Uninitialized variables work around strictNullChecks (follow-up to #13884)