TypeScript/tests/baselines/reference/enums.symbols
Andrew Branch b05dde747c
Update type-only import semantics to allow type queries (#36092)
* Change type-only semantics to allow type queries

* Don’t error using type-only import in ambient context

* Fix default import

* Fix namespace import

* Update more baselines

* Prevent circular resolution

* Track const enum expression usage

* Update baselines

* Perf tuning 1

* Test commit for perf impact

* Weave type-only alias declaration finding into alias resolution

* Fix namespace import of type-only exported symbols

* type-only exports do not contribute to the module object type

* Update APIs

* Fix enum casing, remove type-only conversion suggestion

* Short circuit type-only checks in resolveEntityName faster

* Fix casing in API

* Remove unused parameter

* Fix error on qualified names in type queries

* Allow type-only imports in computed property names

* Fix computed property names of types and abstract members

* Remove unused util

* Commit missing baselines

* Rename “check” functions so as not to overload the word “check”
2020-01-23 12:53:36 -08:00

74 lines
2.3 KiB
Plaintext

=== /a.ts ===
enum SyntaxKind {
>SyntaxKind : Symbol(SyntaxKind, Decl(a.ts, 0, 0))
ImportClause,
>ImportClause : Symbol(SyntaxKind.ImportClause, Decl(a.ts, 0, 17))
ExportDeclaration
>ExportDeclaration : Symbol(SyntaxKind.ExportDeclaration, Decl(a.ts, 1, 15))
}
const enum SymbolFlags {
>SymbolFlags : Symbol(SymbolFlags, Decl(a.ts, 3, 1))
Type = "Type",
>Type : Symbol(SymbolFlags.Type, Decl(a.ts, 5, 24))
Value = "Value"
>Value : Symbol(SymbolFlags.Value, Decl(a.ts, 6, 16))
}
export type { SyntaxKind };
>SyntaxKind : Symbol(SyntaxKind, Decl(a.ts, 10, 13))
export { SymbolFlags };
>SymbolFlags : Symbol(SymbolFlags, Decl(a.ts, 11, 8))
=== /b.ts ===
import type { SyntaxKind, SymbolFlags } from './a';
>SyntaxKind : Symbol(SyntaxKind, Decl(b.ts, 0, 13))
>SymbolFlags : Symbol(SymbolFlags, Decl(b.ts, 0, 25))
SyntaxKind.ImportClause;
>SyntaxKind.ImportClause : Symbol(SyntaxKind.ImportClause, Decl(a.ts, 0, 17))
>SyntaxKind : Symbol(SyntaxKind, Decl(b.ts, 0, 13))
>ImportClause : Symbol(SyntaxKind.ImportClause, Decl(a.ts, 0, 17))
SymbolFlags.Type;
>SymbolFlags.Type : Symbol(SymbolFlags.Type, Decl(a.ts, 5, 24))
>SymbolFlags : Symbol(SymbolFlags, Decl(b.ts, 0, 25))
>Type : Symbol(SymbolFlags.Type, Decl(a.ts, 5, 24))
let kind: SyntaxKind.ImportClause;
>kind : Symbol(kind, Decl(b.ts, 4, 3))
>SyntaxKind : Symbol(SyntaxKind, Decl(b.ts, 0, 13))
>ImportClause : Symbol(SyntaxKind.ImportClause, Decl(a.ts, 0, 17))
let flags: SymbolFlags;
>flags : Symbol(flags, Decl(b.ts, 5, 3))
>SymbolFlags : Symbol(SymbolFlags, Decl(b.ts, 0, 25))
type TypeFlag = SymbolFlags.Type;
>TypeFlag : Symbol(TypeFlag, Decl(b.ts, 5, 23))
>SymbolFlags : Symbol(SymbolFlags, Decl(b.ts, 0, 25))
>Type : Symbol(SymbolFlags.Type, Decl(a.ts, 5, 24))
export type { TypeFlag };
>TypeFlag : Symbol(TypeFlag, Decl(b.ts, 8, 13))
=== /c.ts ===
import { SymbolFlags } from './a';
>SymbolFlags : Symbol(SymbolFlags, Decl(c.ts, 0, 8))
import type { TypeFlag } from './b';
>TypeFlag : Symbol(TypeFlag, Decl(c.ts, 1, 13))
const flags: TypeFlag = SymbolFlags.Type;
>flags : Symbol(flags, Decl(c.ts, 2, 5))
>TypeFlag : Symbol(TypeFlag, Decl(c.ts, 1, 13))
>SymbolFlags.Type : Symbol(SymbolFlags.Type, Decl(a.ts, 5, 24))
>SymbolFlags : Symbol(SymbolFlags, Decl(c.ts, 0, 8))
>Type : Symbol(SymbolFlags.Type, Decl(a.ts, 5, 24))