Skip typechecking file when generating declaraiton to get d.ts signature for incremental build - #58592
Conversation
|
Wesley Wigham (@weswigham) i tried passing noCheck equivalent when running emit for dts emit and i see few tests failing. i have commented on each but if you can take a look and see what we can do for those scenarios that would be great. Thanks |
…n resolve types etc without type checking
|
TypeScript Bot (@typescript-bot) perf test this faster |
516c734 to
5cc1ea4
Compare
|
Jake Bailey (@jakebailey) Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Is this the winning PR or is #58593 still something to consider? Just checking before I review... |
Wesley Wigham (weswigham)
left a comment
There was a problem hiding this comment.
Is this the winning PR or is #58593 still something to consider? Just checking before I review...
They don't appear mutually exclusive to my eye. This one skips the diagnostic pass when calculating signatures. The other skips it when a //@ts-nocheck comment is in a file.
Wesley Wigham (weswigham)
left a comment
There was a problem hiding this comment.
Oh, one caveat though - #58364 isn't in yet, so JS emit is unsafe when you skip diagnostics like this. Is an emit resolver with forceDtsEmit set guaranteed to be only emitting .d.ts files?
|
I don't think that it is guaranteed; I almost made the playground always set forceDtsEmit because it always needs to show it (playground used to crash on dts errors), though I think I actually made it conditional in the current version. |
|
Yes it is guaranteed to be dts only emit as "forceDtsEmit" is internal on program.emit and used only by builder |
|
Isn't it public via |
|
LS.. compile on save.. forgot about that. :( i will upate the condition for now to check if its emitOnlyDts and forceDtsEmit to be true which we can later update in #58364 to remove emitOnlyDts part. |
…it to be done without type checking
Uh oh!
There was an error while loading. Please reload this page.