forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsubstitutionTypeNonGenericIndexType2.symbols
More file actions
30 lines (24 loc) · 1.48 KB
/
substitutionTypeNonGenericIndexType2.symbols
File metadata and controls
30 lines (24 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//// [tests/cases/compiler/substitutionTypeNonGenericIndexType2.ts] ////
=== substitutionTypeNonGenericIndexType2.ts ===
type BasicConditional<T> = keyof T extends infer R ? R : never;
>BasicConditional : Symbol(BasicConditional, Decl(substitutionTypeNonGenericIndexType2.ts, 0, 0))
>T : Symbol(T, Decl(substitutionTypeNonGenericIndexType2.ts, 0, 22))
>T : Symbol(T, Decl(substitutionTypeNonGenericIndexType2.ts, 0, 22))
>R : Symbol(R, Decl(substitutionTypeNonGenericIndexType2.ts, 0, 48))
>R : Symbol(R, Decl(substitutionTypeNonGenericIndexType2.ts, 0, 48))
type Config = { rejectClose: true };
>Config : Symbol(Config, Decl(substitutionTypeNonGenericIndexType2.ts, 0, 63))
>rejectClose : Symbol(rejectClose, Decl(substitutionTypeNonGenericIndexType2.ts, 2, 15))
type Test = Config extends {}
>Test : Symbol(Test, Decl(substitutionTypeNonGenericIndexType2.ts, 2, 36))
>Config : Symbol(Config, Decl(substitutionTypeNonGenericIndexType2.ts, 0, 63))
? {
rejectClose: BasicConditional<Config>;
>rejectClose : Symbol(rejectClose, Decl(substitutionTypeNonGenericIndexType2.ts, 5, 5))
>BasicConditional : Symbol(BasicConditional, Decl(substitutionTypeNonGenericIndexType2.ts, 0, 0))
>Config : Symbol(Config, Decl(substitutionTypeNonGenericIndexType2.ts, 0, 63))
}
: never;
const test: Test["rejectClose"] = "rejectClose";
>test : Symbol(test, Decl(substitutionTypeNonGenericIndexType2.ts, 10, 5))
>Test : Symbol(Test, Decl(substitutionTypeNonGenericIndexType2.ts, 2, 36))