Skip to content

Add TReturn/TNext to Iterable et al - #58243

Merged
Ron Buckton (rbuckton) merged 29 commits into
mainfrom
iterator-default-return
Jul 19, 2024
Merged

Add TReturn/TNext to Iterable et al#58243
Ron Buckton (rbuckton) merged 29 commits into
mainfrom
iterator-default-return

Conversation

@rbuckton

@rbucktonRon Buckton (rbuckton) commented Apr 18, 2024

Copy link
Copy Markdown
Contributor

We avoided making this change in the past as it was very breaky, but at some point we need to address this discrepancy. Having incorrect types here is also causing problems with properly typing the Iterator Helpers proposal.

This also adds a new BuiltinIteratorReturn intrinsic type whose actual type is determined by the state of a new strictBuiltinIteratorReturn compiler option:

  • "strictBuiltinIteratorReturn": false - any (emulates current behavior for IterableIterator)
  • "strictBuiltinIteratorReturn": true - undefined

The strictBuiltinIteratorReturn is a strict option flag, meaning that it is enabled automatically when you set "strict": true in your tsconfig.json.

The new BuiltinIteratorReturn type is passed as the TReturn type argument for built-ins using IterableIterator or AsyncIterableIterator to enable stricter checks against the result of calling next() on the iterator.

Enabling strictBuiltinIteratorReturn results in a more accurate and type-safe return type for the next() methods of iterators produced by built-ins like Array, Set, Map, etc.:

// @strictBuiltinIteratorReturn: false// NOTE: matches current behaviorconstset=newSet(["a"]);constresult=set.keys().next();// ^? result: IteratorResult<string, any>constvalue=result.value;// ^? value: anyif(!result.done){constvalue=result.value;// ^? value: string}else{constvalue=result.value;// ^? value: any}

vs

// @strictBuiltinIteratorReturn: trueconstset=newSet(["a"]);constresult=set.keys().next();// ^? result: IteratorResult<string, undefined>constvalue=result.value;// ^? value: string | undefinedif(!result.done){constvalue=result.value;// ^? value: string}else{constvalue=result.value;// ^? value: undefined}

Since this is a strict flag, there is a fair amount of existing code that will likely produce new compilation errors as a result of this change:

// @strict: truefunctiononly<T>(set: Set<T>): T{if(set.size!==1)thrownewTypeError();returnset.keys().next().value;// worked previously since result was `any`, but is now an error}

This now fails as there is no correlation between set.size and the iterator produced by keys(), so the compiler is unaware that this constraint has been validated. If you are certain iterator will always yield at least one value, you can use a non-null assertion operator to strip off the | undefined:

// @strict: truefunctiononly<T>(set: Set<T>): T{if(set.size!==1)thrownewTypeError();returnset.keys().next().value!;}

A follow-on PR to TypeScript-DOM-lib-generator can be found here: microsoft/TypeScript-DOM-lib-generator#1713

DefinitelyTyped breaks will be addressed by DefinitelyTyped/DefinitelyTyped#69632

fp-ts breaks will be addressed by gcanti/fp-ts#1949

webpack breaks will be addressed by webpack/webpack#18591

Fixes#33353
Fixes#52998
Fixes#43750
Closes#56517
Related #58222

@rbuckton

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@rbuckton

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@rbuckton

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@rbuckton

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@rbuckton

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@rbuckton

Ron Buckton (rbuckton) commented Apr 19, 2024

Copy link
Copy Markdown
ContributorAuthor

Hey Ron Buckton (@rbuckton), the results of running the DT tests are ready.

There were interesting changes:

Changes are too big to display here, please check the log.

You can check the log here.

Jake Bailey (@jakebailey), Wesley Wigham (@weswigham): Am I missing something? The bot says there were interesting changes but it links to a clean pipeline result.

@jakebailey

Copy link
Copy Markdown
Member

I believe this is what we decided on in the meeting and seems sound; I think that all that's left here is just to run perf on the final state (I don't think its been done in a bit, just the extended tests).

At least, once ADO is back online: https://status.dev.azure.com/

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented Jul 19, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
perf test❌ Error: `Error:
<style type='text/css'> body { margin: 0; color: #000; font-family: "-apple-system",BlinkMacSystemFont,"Segoe UI",` | |

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

The perf shouldn't have changed since the only real changes since it was last run were swapping around what type to use when the flag is enabled, but I'll try it again when the AzDO outage is over

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented Jul 19, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
perf test✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
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 used193,447k (± 0.94%)192,835k (± 0.72%)~192,226k195,677kp=0.378 n=6
Parse Time1.96s (± 1.27%)1.95s (± 0.75%)~1.93s1.97sp=0.222 n=6
Bind Time1.06s (± 0.84%)1.06s (± 0.77%)~1.05s1.07sp=0.550 n=6
Check Time13.97s (± 0.38%)13.95s (± 0.39%)~13.89s14.01sp=0.687 n=6
Emit Time4.03s (± 0.73%)3.99s (± 0.97%)~3.92s4.02sp=0.076 n=6
Total Time21.02s (± 0.20%)20.95s (± 0.32%)-0.08s (- 0.36%)20.88s21.07sp=0.045 n=6
angular-1 - node (v18.15.0, x64)
Errors57🔻+2 (+40.00%)~~p=0.001 n=6
Symbols944,250945,484+1,234 (+ 0.13%)~~p=0.001 n=6
Types407,076409,343+2,267 (+ 0.56%)~~p=0.001 n=6
Memory used1,218,683k (± 0.00%)1,220,806k (± 0.00%)+2,124k (+ 0.17%)1,220,745k1,220,853kp=0.005 n=6
Parse Time8.02s (± 0.56%)7.90s (± 0.45%)-0.13s (- 1.56%)7.84s7.93sp=0.005 n=6
Bind Time2.23s (± 0.34%)2.24s (± 0.77%)~2.22s2.26sp=0.404 n=6
Check Time36.38s (± 0.63%)36.34s (± 0.45%)~36.18s36.60sp=0.872 n=6
Emit Time17.88s (± 0.72%)17.94s (± 0.42%)~17.84s18.05sp=0.470 n=6
Total Time64.52s (± 0.52%)64.42s (± 0.33%)~64.20s64.77sp=0.810 n=6
mui-docs - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,276,1562,276,267+111 (+ 0.00%)~~p=0.001 n=6
Types948,845949,009+164 (+ 0.02%)~~p=0.001 n=6
Memory used2,207,580k (± 0.00%)2,207,979k (± 0.00%)+398k (+ 0.02%)2,207,770k2,208,072kp=0.005 n=6
Parse Time9.67s (± 0.44%)9.67s (± 0.35%)~9.61s9.70sp=0.468 n=6
Bind Time3.38s (± 0.74%)3.38s (± 1.29%)~3.32s3.43sp=0.935 n=6
Check Time105.60s (± 0.57%)105.62s (± 0.41%)~105.18s106.43sp=1.000 n=6
Emit Time0.20s (± 2.62%)0.20s (± 4.01%)~0.19s0.21sp=0.140 n=6
Total Time118.85s (± 0.54%)118.87s (± 0.37%)~118.50s119.74sp=0.936 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,227,3321,230,214+2,882 (+ 0.23%)~~p=0.001 n=6
Types261,851265,676+3,825 (+ 1.46%)~~p=0.001 n=6
Memory used2,401,304k (± 6.04%)2,465,455k (± 7.46%)+64,151k (+ 2.67%)2,345,723k2,703,780kp=0.031 n=6
Parse Time6.08s (± 0.92%)6.08s (± 0.60%)~6.04s6.13sp=0.630 n=6
Bind Time2.26s (± 0.46%)2.26s (± 1.14%)~2.22s2.28sp=0.871 n=6
Check Time40.54s (± 0.72%)40.62s (± 0.60%)~40.29s40.91sp=0.810 n=6
Emit Time3.82s (± 1.38%)3.89s (± 1.49%)~3.83s3.97sp=0.092 n=6
Total Time52.72s (± 0.60%)52.84s (± 0.45%)~52.53s53.11sp=0.748 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,227,3321,230,214+2,882 (+ 0.23%)~~p=0.001 n=6
Types261,851265,676+3,825 (+ 1.46%)~~p=0.001 n=6
Memory used2,415,224k (± 0.03%)2,420,788k (± 0.03%)+5,564k (+ 0.23%)2,420,129k2,421,854kp=0.005 n=6
Parse Time5.27s (± 1.34%)5.27s (± 0.95%)~5.22s5.34sp=0.688 n=6
Bind Time1.69s (± 0.69%)1.70s (± 0.78%)~1.68s1.71sp=0.206 n=6
Check Time34.95s (± 0.35%)35.15s (± 0.28%)+0.20s (+ 0.57%)35.02s35.32sp=0.013 n=6
Emit Time3.37s (± 1.69%)3.34s (± 1.73%)~3.29s3.45sp=0.377 n=6
Total Time45.28s (± 0.38%)45.46s (± 0.22%)~45.27s45.57sp=0.092 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols258,516258,669+153 (+ 0.06%)~~p=0.001 n=6
Types104,901105,403+502 (+ 0.48%)~~p=0.001 n=6
Memory used427,887k (± 0.02%)428,292k (± 0.02%)+404k (+ 0.09%)428,174k428,457kp=0.005 n=6
Parse Time4.14s (± 0.43%)4.14s (± 0.37%)~4.12s4.16sp=1.000 n=6
Bind Time1.62s (± 1.68%)1.64s (± 0.75%)~1.62s1.65sp=0.491 n=6
Check Time22.18s (± 0.22%)22.23s (± 0.25%)~22.17s22.31sp=0.142 n=6
Emit Time2.00s (± 1.03%)2.01s (± 0.75%)~1.98s2.02sp=0.371 n=6
Total Time29.94s (± 0.25%)30.01s (± 0.17%)~29.96s30.08sp=0.145 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,565224,852+287 (+ 0.13%)~~p=0.001 n=6
Types93,73494,040+306 (+ 0.33%)~~p=0.001 n=6
Memory used369,634k (± 0.03%)369,874k (± 0.04%)+240k (+ 0.06%)369,726k370,159kp=0.008 n=6
Parse Time3.47s (± 0.43%)3.44s (± 0.48%)-0.03s (- 0.91%)3.41s3.46sp=0.015 n=6
Bind Time1.93s (± 0.63%)1.93s (± 1.07%)~1.91s1.96sp=0.935 n=6
Check Time19.33s (± 0.52%)19.25s (± 0.25%)~19.18s19.31sp=0.128 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.73s (± 0.42%)24.62s (± 0.20%)~24.55s24.67sp=0.108 n=6
vscode - node (v18.15.0, x64)
Errors04🔻+4 (+ ∞%)~~p=0.001 n=6
Symbols2,973,3492,974,196+847 (+ 0.03%)~~p=0.001 n=6
Types1,021,1571,023,116+1,959 (+ 0.19%)~~p=0.001 n=6
Memory used3,097,712k (± 0.00%)3,099,803k (± 0.00%)+2,091k (+ 0.07%)3,099,760k3,099,855kp=0.005 n=6
Parse Time11.65s (± 0.24%)11.63s (± 0.51%)~11.55s11.70sp=0.688 n=6
Bind Time3.56s (± 0.33%)3.59s (± 2.19%)~3.55s3.75sp=0.804 n=6
Check Time68.75s (± 0.35%)68.67s (± 0.27%)~68.39s68.86sp=0.688 n=6
Emit Time17.27s (± 0.78%)17.48s (± 0.66%)+0.20s (+ 1.17%)17.27s17.58sp=0.030 n=6
Total Time101.25s (± 0.29%)101.36s (± 0.29%)~100.96s101.69sp=0.575 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols267,370267,518+148 (+ 0.06%)~~p=0.001 n=6
Types108,862109,024+162 (+ 0.15%)~~p=0.001 n=6
Memory used411,934k (± 0.01%)412,274k (± 0.01%)+340k (+ 0.08%)412,209k412,344kp=0.005 n=6
Parse Time3.19s (± 0.57%)3.17s (± 0.33%)~3.16s3.19sp=0.249 n=6
Bind Time1.41s (± 0.37%)1.41s (± 0.39%)~1.40s1.41sp=0.640 n=6
Check Time14.37s (± 0.59%)14.29s (± 0.52%)~14.18s14.41sp=0.128 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time18.96s (± 0.53%)18.87s (± 0.43%)~18.75s19.00sp=0.128 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols510,573510,625+52 (+ 0.01%)~~p=0.001 n=6
Types161,621161,746+125 (+ 0.08%)~~p=0.001 n=6
Memory used448,287k (± 0.09%)448,438k (± 0.03%)~448,274k448,642kp=0.936 n=6
Parse Time3.90s (± 0.56%)3.90s (± 0.45%)~3.87s3.91sp=1.000 n=6
Bind Time1.45s (± 0.52%)1.44s (± 0.52%)-0.01s (- 0.92%)1.43s1.45sp=0.024 n=6
Check Time21.18s (± 0.67%)21.23s (± 0.26%)~21.16s21.32sp=0.810 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time26.53s (± 0.61%)26.56s (± 0.25%)~26.51s26.69sp=0.810 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

tsserver

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,298ms (± 0.34%)2,302ms (± 0.34%)~2,292ms2,310msp=0.575 n=6
Req 2 - geterr5,171ms (± 0.43%)5,136ms (± 0.53%)~5,101ms5,162msp=0.128 n=6
Req 3 - references263ms (± 0.29%)262ms (± 1.10%)~258ms264msp=0.672 n=6
Req 4 - navto227ms (± 0.23%)227ms (± 0.56%)~226ms229msp=0.931 n=6
Req 5 - completionInfo count1,3571,357~~~p=1.000 n=6
Req 5 - completionInfo87ms (± 6.25%)88ms (± 3.68%)~84ms92msp=0.807 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen3,576ms (± 0.74%)3,593ms (± 0.55%)~3,572ms3,619msp=0.261 n=6
Req 2 - geterr5,674ms (± 0.68%)5,671ms (± 0.42%)~5,641ms5,698msp=0.936 n=6
Req 3 - references413ms (± 1.56%)410ms (± 0.40%)~408ms412msp=0.809 n=6
Req 4 - navto341ms (± 0.72%)340ms (± 0.25%)~338ms340msp=0.115 n=6
Req 5 - completionInfo count1,5191,519~~~p=1.000 n=6
Req 5 - completionInfo122ms (± 5.06%)121ms (± 5.40%)~108ms125msp=0.934 n=6
xstate-main-1-tsserver - node (v18.15.0, x64)
Req 1 - updateOpen5,178ms (± 0.35%)5,181ms (± 0.17%)~5,172ms5,195msp=0.810 n=6
Req 2 - geterr1,119ms (± 1.27%)1,110ms (± 1.01%)~1,099ms1,131msp=0.128 n=6
Req 3 - references88ms (± 4.22%)89ms (± 3.32%)~86ms92msp=0.797 n=6
Req 4 - navto452ms (± 0.18%)442ms (± 0.18%)-9ms (- 2.07%)441ms443msp=0.004 n=6
Req 5 - completionInfo count3,4173,417~~~p=1.000 n=6
Req 5 - completionInfo814ms (± 0.53%)805ms (± 0.95%)~794ms816msp=0.053 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)
  • xstate-main-1-tsserver - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

startup

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
tsc-startup - node (v18.15.0, x64)
Execution time228.66ms (± 0.16%)228.52ms (± 0.14%)-0.14ms (- 0.06%)226.93ms230.79msp=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time347.82ms (± 0.31%)348.05ms (± 0.31%)+0.23ms (+ 0.07%)340.17ms356.16msp=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time227.77ms (± 0.13%)227.69ms (± 0.15%)-0.08ms (- 0.04%)226.18ms232.43msp=0.000 n=600
typescript-startup - node (v18.15.0, x64)
Execution time226.19ms (± 0.15%)226.17ms (± 0.16%)~224.42ms230.49msp=0.358 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

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Jake Bailey (@jakebailey): It looks like the perf run was nominal.

Comment threadsrc/compiler/checker.ts Outdated
Comment threadsrc/compiler/checker.ts Outdated
if (type.target.typeParameters) {
typeParameterCount = Math.min(type.target.typeParameters.length, typeArguments.length);

// Maybe we should do this for more types, but for now we only elide type arguments that are

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what other kinds of types would benefit from this?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Potentially any type since this simplifies the emit output to avoid repeating type arguments for type parameters with defaults, but rather than take that on in this PR I focused on this subset to improve back compat.

type.node.typeArguments.length < typeParameterCount
) {
while (typeParameterCount > 0) {
const typeArgument = typeArguments[typeParameterCount - 1];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

an incidental question, but: what is a case where typeArguments.length > 0 but also !type.node.typeArguments is true?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

type argument inference

// Maybe we should do this for more types, but for now we only elide type arguments that are
// identical to their associated type parameters' defaults for `Iterable`, `IterableIterator`,
// `AsyncIterable`, and `AsyncIterableIterator` to provide backwards-compatible .d.ts emit due
// to each now having three type parameters instead of only one.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

overall this seems like an odd way to support this backward compatibility, but I don't understand the problem space well enough to suggest anything else

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Realistically, this is all about what the type "looks" like, right? Or are we really needing to depend on this emit still emitting the "old thing" to continue to work right for downstream users of d.ts files?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Consider an application that is currently built using TS 5.5 that depends on a library that is also being built using TS 5.5. The library chooses to upgrade its version of TypeScript to 5.6, and the new emit produces Iterable<T, any, any> where it previously produced Iterable<T>. If the library makes no other code changes and publishes their new build, the application cannot take the update without also updating TypeScript because the expected arity of Iterable has changed.
The library can't just ship a forward declaration of interface Iterable<T, TReturn = any, TNext = any> {}, because our checker performs arity checks on built-ins, and the application might not be running with skipLibCheck, so one way or another they would have errors they cannot silence without possibly giving up the dependency verification that skipLibChecks: false offers.

this._copyOnWrite = false;
}
}
return undefined;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

will all generators need to return undefined now? do you have an estimate of how much code that breaks?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

from reading type baselines, it looks like their return type changes to any instead of undefined

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This is specifically because this is an implementation of the native Map<K, V> interface, which is now specified to return IterableIterator<T, BuiltinIteratorReturn> (which is IterableIterator<T, undefined> under the new flag).

@jakebailey

Copy link
Copy Markdown
Member

I tested this on the most iterator-y codebase I know (effect) and it only caused one break (positively), so that's good.

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

I tested this on the most iterator-y codebase I know (effect) and it only caused one break (positively), so that's good.

In all of the PRs I've created so far for top libraries, it's usually only been one or two cases where they were (possibly unknowingly) depending on the result of set.next().value being typed as any by default.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I still have a couple of background questions. I think this PR is worth trying in the beta to see if it's too breaky. But all the first-order breaks look good, and the higher-order ones are, I bet, rare. (like, just fpt-ts :)

@rbuckton
Ron Buckton (rbuckton) deleted the iterator-default-return branch July 19, 2024 17:14
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamBreaking ChangeWould introduce errors in existing codeDomain: APIRelates to the public API for TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

None yet

7 participants

@rbuckton@typescript-bot@jakebailey@bakkot@Renegade334@sandersn@weswigham