forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lookup retained type nodes in the node builder using correct, specifi…
…c SymbolFlags meaning (microsoft#57887)
- Loading branch information
1 parent
6ea273c
commit a9375fd
Showing
9 changed files
with
169 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 49 additions & 49 deletions
98
tests/baselines/reference/declarationEmitGlobalThisPreserved.types
Large diffs are not rendered by default.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
tests/baselines/reference/declarationEmitRetainedAnnotationRetainsImportInOutput.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//// [tests/cases/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.ts] //// | ||
|
||
//// [index.d.ts] | ||
export type Whatever<T> = {x: T}; | ||
export declare function something<T>(cb: () => Whatever<T>): Whatever<T>; | ||
|
||
//// [index.ts] | ||
import * as E from 'whatever'; | ||
|
||
export const run = <E>(i: () => E.Whatever<E>): E.Whatever<E> => E.something(i); | ||
|
||
//// [index.js] | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.run = void 0; | ||
var E = require("whatever"); | ||
var run = function (i) { return E.something(i); }; | ||
exports.run = run; | ||
|
||
|
||
//// [index.d.ts] | ||
import * as E from 'whatever'; | ||
export declare const run: <E>(i: () => E.Whatever<E>) => E.Whatever<E>; |
37 changes: 37 additions & 0 deletions
37
tests/baselines/reference/declarationEmitRetainedAnnotationRetainsImportInOutput.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//// [tests/cases/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.ts] //// | ||
|
||
=== node_modules/whatever/index.d.ts === | ||
export type Whatever<T> = {x: T}; | ||
>Whatever : Symbol(Whatever, Decl(index.d.ts, 0, 0)) | ||
>T : Symbol(T, Decl(index.d.ts, 0, 21)) | ||
>x : Symbol(x, Decl(index.d.ts, 0, 27)) | ||
>T : Symbol(T, Decl(index.d.ts, 0, 21)) | ||
|
||
export declare function something<T>(cb: () => Whatever<T>): Whatever<T>; | ||
>something : Symbol(something, Decl(index.d.ts, 0, 33)) | ||
>T : Symbol(T, Decl(index.d.ts, 1, 34)) | ||
>cb : Symbol(cb, Decl(index.d.ts, 1, 37)) | ||
>Whatever : Symbol(Whatever, Decl(index.d.ts, 0, 0)) | ||
>T : Symbol(T, Decl(index.d.ts, 1, 34)) | ||
>Whatever : Symbol(Whatever, Decl(index.d.ts, 0, 0)) | ||
>T : Symbol(T, Decl(index.d.ts, 1, 34)) | ||
|
||
=== index.ts === | ||
import * as E from 'whatever'; | ||
>E : Symbol(E, Decl(index.ts, 0, 6)) | ||
|
||
export const run = <E>(i: () => E.Whatever<E>): E.Whatever<E> => E.something(i); | ||
>run : Symbol(run, Decl(index.ts, 2, 12)) | ||
>E : Symbol(E, Decl(index.ts, 2, 20)) | ||
>i : Symbol(i, Decl(index.ts, 2, 23)) | ||
>E : Symbol(E, Decl(index.ts, 0, 6)) | ||
>Whatever : Symbol(E.Whatever, Decl(index.d.ts, 0, 0)) | ||
>E : Symbol(E, Decl(index.ts, 2, 20)) | ||
>E : Symbol(E, Decl(index.ts, 0, 6)) | ||
>Whatever : Symbol(E.Whatever, Decl(index.d.ts, 0, 0)) | ||
>E : Symbol(E, Decl(index.ts, 2, 20)) | ||
>E.something : Symbol(E.something, Decl(index.d.ts, 0, 33)) | ||
>E : Symbol(E, Decl(index.ts, 0, 6)) | ||
>something : Symbol(E.something, Decl(index.d.ts, 0, 33)) | ||
>i : Symbol(i, Decl(index.ts, 2, 23)) | ||
|
27 changes: 27 additions & 0 deletions
27
tests/baselines/reference/declarationEmitRetainedAnnotationRetainsImportInOutput.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//// [tests/cases/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.ts] //// | ||
|
||
=== node_modules/whatever/index.d.ts === | ||
export type Whatever<T> = {x: T}; | ||
>Whatever : Whatever<T> | ||
>x : T | ||
|
||
export declare function something<T>(cb: () => Whatever<T>): Whatever<T>; | ||
>something : <T>(cb: () => Whatever<T>) => Whatever<T> | ||
>cb : () => Whatever<T> | ||
|
||
=== index.ts === | ||
import * as E from 'whatever'; | ||
>E : typeof E | ||
|
||
export const run = <E>(i: () => E.Whatever<E>): E.Whatever<E> => E.something(i); | ||
>run : <E>(i: () => E.Whatever<E>) => E.Whatever<E> | ||
><E>(i: () => E.Whatever<E>): E.Whatever<E> => E.something(i) : <E>(i: () => E.Whatever<E>) => E.Whatever<E> | ||
>i : () => E.Whatever<E> | ||
>E : any | ||
>E : any | ||
>E.something(i) : E.Whatever<E> | ||
>E.something : <T>(cb: () => E.Whatever<T>) => E.Whatever<T> | ||
>E : typeof E | ||
>something : <T>(cb: () => E.Whatever<T>) => E.Whatever<T> | ||
>i : () => E.Whatever<E> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
tests/cases/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// @strict: true | ||
// @declaration: true | ||
// @filename: node_modules/whatever/index.d.ts | ||
export type Whatever<T> = {x: T}; | ||
export declare function something<T>(cb: () => Whatever<T>): Whatever<T>; | ||
|
||
// @filename: index.ts | ||
import * as E from 'whatever'; | ||
|
||
export const run = <E>(i: () => E.Whatever<E>): E.Whatever<E> => E.something(i); |