@@ -302,48 +302,108 @@ export type c4oReturn = ReturnType<ReturnType<typeof cObj['c4']>>;
302
302
>ReturnType : Symbol(ReturnType, Decl(lib.es5.d.ts, --, --))
303
303
>cObj : Symbol(cObj, Decl(declarationEmitGlobalThisPreserved.ts, 44, 12))
304
304
305
- export function returnTypeFromInside () {
306
- >returnTypeFromInside : Symbol(returnTypeFromInside , Decl(declarationEmitGlobalThisPreserved.ts, 52, 66))
305
+ export function d1 () {
306
+ >d1 : Symbol(d1 , Decl(declarationEmitGlobalThisPreserved.ts, 52, 66))
307
307
308
- const bar = (isNan : typeof globalThis.isNaN): typeof globalThis.isNaN => isNan
309
- >bar : Symbol(bar , Decl(declarationEmitGlobalThisPreserved.ts, 55, 9))
310
- >isNan : Symbol(isNan , Decl(declarationEmitGlobalThisPreserved.ts, 55, 17 ))
308
+ const fn = (isNaN : typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN;
309
+ >fn : Symbol(fn , Decl(declarationEmitGlobalThisPreserved.ts, 55, 9))
310
+ >isNaN : Symbol(isNaN , Decl(declarationEmitGlobalThisPreserved.ts, 55, 16 ))
311
311
>globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
312
312
>globalThis : Symbol(globalThis)
313
313
>isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
314
314
>globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
315
315
>globalThis : Symbol(globalThis)
316
316
>isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
317
- >isNan : Symbol(isNan , Decl(declarationEmitGlobalThisPreserved.ts, 55, 17 ))
317
+ >isNaN : Symbol(isNaN , Decl(declarationEmitGlobalThisPreserved.ts, 55, 16 ))
318
318
319
- function baz() {
320
- >baz : Symbol(baz, Decl(declarationEmitGlobalThisPreserved.ts, 55, 82))
319
+ return function() { return fn };
320
+ >fn : Symbol(fn, Decl(declarationEmitGlobalThisPreserved.ts, 55, 9))
321
+ }
322
+
323
+ export function d2() {
324
+ >d2 : Symbol(d2, Decl(declarationEmitGlobalThisPreserved.ts, 57, 1))
325
+
326
+ const fn = (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN;
327
+ >fn : Symbol(fn, Decl(declarationEmitGlobalThisPreserved.ts, 60, 9))
328
+ >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 60, 16))
329
+ >globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
330
+ >globalThis : Symbol(globalThis)
331
+ >isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
332
+ >bar : Symbol(bar, Decl(declarationEmitGlobalThisPreserved.ts, 60, 47))
333
+ >globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
334
+ >globalThis : Symbol(globalThis)
335
+ >isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
336
+ >globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
337
+ >globalThis : Symbol(globalThis)
338
+ >isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
339
+ >bar : Symbol(bar, Decl(declarationEmitGlobalThisPreserved.ts, 60, 47))
340
+ >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 60, 16))
341
+
342
+ return function() { return fn };
343
+ >fn : Symbol(fn, Decl(declarationEmitGlobalThisPreserved.ts, 60, 9))
344
+ }
345
+
346
+ export function d3() {
347
+ >d3 : Symbol(d3, Decl(declarationEmitGlobalThisPreserved.ts, 62, 1))
348
+
349
+ const fn = (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar;
350
+ >fn : Symbol(fn, Decl(declarationEmitGlobalThisPreserved.ts, 65, 9))
351
+ >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 65, 16))
352
+ >bar : Symbol(bar, Decl(declarationEmitGlobalThisPreserved.ts, 65, 30))
353
+ >globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
354
+ >globalThis : Symbol(globalThis)
355
+ >isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
356
+ >globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
357
+ >globalThis : Symbol(globalThis)
358
+ >isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
359
+ >bar : Symbol(bar, Decl(declarationEmitGlobalThisPreserved.ts, 65, 30))
321
360
322
- return bar;
323
- >bar : Symbol(bar, Decl(declarationEmitGlobalThisPreserved.ts, 55, 9))
324
- }
361
+ return function() { return fn };
362
+ >fn : Symbol(fn, Decl(declarationEmitGlobalThisPreserved.ts, 65, 9))
363
+ }
364
+
365
+ export function d4() {
366
+ >d4 : Symbol(d4, Decl(declarationEmitGlobalThisPreserved.ts, 67, 1))
367
+
368
+ const fn = (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN;
369
+ >fn : Symbol(fn, Decl(declarationEmitGlobalThisPreserved.ts, 70, 9))
370
+ >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 70, 16))
371
+ >globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
372
+ >globalThis : Symbol(globalThis)
373
+ >isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
374
+ >globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
375
+ >globalThis : Symbol(globalThis)
376
+ >isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
325
377
326
- return baz ;
327
- >baz : Symbol(baz , Decl(declarationEmitGlobalThisPreserved.ts, 55, 82 ))
378
+ return function() { return fn } ;
379
+ >fn : Symbol(fn , Decl(declarationEmitGlobalThisPreserved.ts, 70, 9 ))
328
380
}
329
381
382
+ export type d4Return = ReturnType<ReturnType<ReturnType<ReturnType<typeof d4>>>>;
383
+ >d4Return : Symbol(d4Return, Decl(declarationEmitGlobalThisPreserved.ts, 72, 1))
384
+ >ReturnType : Symbol(ReturnType, Decl(lib.es5.d.ts, --, --))
385
+ >ReturnType : Symbol(ReturnType, Decl(lib.es5.d.ts, --, --))
386
+ >ReturnType : Symbol(ReturnType, Decl(lib.es5.d.ts, --, --))
387
+ >ReturnType : Symbol(ReturnType, Decl(lib.es5.d.ts, --, --))
388
+ >d4 : Symbol(d4, Decl(declarationEmitGlobalThisPreserved.ts, 67, 1))
389
+
330
390
// Non-inference cases.
331
391
332
392
export const explicitlyTypedVariable: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN = (isNaN) => isNaN;
333
- >explicitlyTypedVariable : Symbol(explicitlyTypedVariable, Decl(declarationEmitGlobalThisPreserved.ts, 66 , 12))
334
- >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 66 , 39))
393
+ >explicitlyTypedVariable : Symbol(explicitlyTypedVariable, Decl(declarationEmitGlobalThisPreserved.ts, 78 , 12))
394
+ >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 78 , 39))
335
395
>globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
336
396
>globalThis : Symbol(globalThis)
337
397
>isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
338
398
>globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
339
399
>globalThis : Symbol(globalThis)
340
400
>isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
341
- >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 66 , 101))
342
- >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 66 , 101))
401
+ >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 78 , 101))
402
+ >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 78 , 101))
343
403
344
404
export function explicitlyTypedFunction(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN {
345
- >explicitlyTypedFunction : Symbol(explicitlyTypedFunction, Decl(declarationEmitGlobalThisPreserved.ts, 66 , 117))
346
- >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 68 , 40))
405
+ >explicitlyTypedFunction : Symbol(explicitlyTypedFunction, Decl(declarationEmitGlobalThisPreserved.ts, 78 , 117))
406
+ >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 80 , 40))
347
407
>globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
348
408
>globalThis : Symbol(globalThis)
349
409
>isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
@@ -352,33 +412,33 @@ export function explicitlyTypedFunction(isNaN: typeof globalThis.isNaN): typeof
352
412
>isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
353
413
354
414
return isNaN;
355
- >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 68 , 40))
415
+ >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 80 , 40))
356
416
357
417
};
358
418
359
419
export type AsObjectProperty = {
360
- >AsObjectProperty : Symbol(AsObjectProperty, Decl(declarationEmitGlobalThisPreserved.ts, 70 , 2))
420
+ >AsObjectProperty : Symbol(AsObjectProperty, Decl(declarationEmitGlobalThisPreserved.ts, 82 , 2))
361
421
362
422
isNaN: typeof globalThis.isNaN;
363
- >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 72 , 32))
423
+ >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 84 , 32))
364
424
>globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
365
425
>globalThis : Symbol(globalThis)
366
426
>isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
367
427
}
368
428
369
429
export class AsClassProperty {
370
- >AsClassProperty : Symbol(AsClassProperty, Decl(declarationEmitGlobalThisPreserved.ts, 74 , 1))
430
+ >AsClassProperty : Symbol(AsClassProperty, Decl(declarationEmitGlobalThisPreserved.ts, 86 , 1))
371
431
372
432
isNaN?: typeof globalThis.isNaN;
373
- >isNaN : Symbol(AsClassProperty.isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 76 , 30))
433
+ >isNaN : Symbol(AsClassProperty.isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 88 , 30))
374
434
>globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
375
435
>globalThis : Symbol(globalThis)
376
436
>isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
377
437
}
378
438
379
439
export type AsFunctionType = (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN;
380
- >AsFunctionType : Symbol(AsFunctionType, Decl(declarationEmitGlobalThisPreserved.ts, 78 , 1))
381
- >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 80 , 30))
440
+ >AsFunctionType : Symbol(AsFunctionType, Decl(declarationEmitGlobalThisPreserved.ts, 90 , 1))
441
+ >isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 92 , 30))
382
442
>globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
383
443
>globalThis : Symbol(globalThis)
384
444
>isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
0 commit comments