mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
add tests for nested type unions through aliases
This commit is contained in:
@@ -114,6 +114,17 @@ getExprType
|
||||
| tst.ts:63:5:63:8 | Ctor | abstract new () => HasArea |
|
||||
| tst.ts:63:11:63:36 | abstrac ... HasArea | abstract new () => HasArea |
|
||||
| tst.ts:63:40:63:44 | Shape | any |
|
||||
| tst.ts:65:17:65:23 | myUnion | true |
|
||||
| tst.ts:65:35:65:46 | stillMyUnion | true |
|
||||
| tst.ts:66:5:66:10 | union1 | MyUnion |
|
||||
| tst.ts:66:23:66:37 | {myUnion: true} | MyUnion |
|
||||
| tst.ts:66:24:66:30 | myUnion | true |
|
||||
| tst.ts:66:33:66:36 | true | true |
|
||||
| tst.ts:68:28:68:41 | yetAnotherType | true |
|
||||
| tst.ts:69:5:69:10 | union2 | MyUnion2 |
|
||||
| tst.ts:69:24:69:45 | {yetAno ... : true} | MyUnion2 |
|
||||
| tst.ts:69:25:69:38 | yetAnotherType | true |
|
||||
| tst.ts:69:41:69:44 | true | true |
|
||||
| type_alias.ts:3:5:3:5 | b | boolean |
|
||||
| type_alias.ts:7:5:7:5 | c | ValueOrArray<number> |
|
||||
| type_alias.ts:14:9:14:32 | [proper ... ]: Json | any |
|
||||
@@ -165,6 +176,8 @@ getExprType
|
||||
getTypeDefinitionType
|
||||
| tst.ts:54:1:56:1 | interfa ... mber;\\n} | NonAbstractDummy |
|
||||
| tst.ts:58:1:60:1 | interfa ... mber;\\n} | HasArea |
|
||||
| tst.ts:65:1:65:54 | type My ... true}; | MyUnion |
|
||||
| tst.ts:68:1:68:49 | type My ... true}; | MyUnion2 |
|
||||
| type_alias.ts:1:1:1:17 | type B = boolean; | boolean |
|
||||
| type_alias.ts:5:1:5:50 | type Va ... ay<T>>; | ValueOrArray<T> |
|
||||
| type_alias.ts:9:1:15:13 | type Js ... Json[]; | Json |
|
||||
@@ -260,6 +273,19 @@ getTypeExprType
|
||||
| tst.ts:59:14:59:19 | number | number |
|
||||
| tst.ts:63:11:63:36 | abstrac ... HasArea | abstract new () => HasArea |
|
||||
| tst.ts:63:30:63:36 | HasArea | HasArea |
|
||||
| tst.ts:65:6:65:12 | MyUnion | MyUnion |
|
||||
| tst.ts:65:16:65:30 | {myUnion: true} | { myUnion: true; } |
|
||||
| tst.ts:65:16:65:53 | {myUnio ... : true} | { myUnion: true; } \| { stillMyUnion: true; } |
|
||||
| tst.ts:65:26:65:29 | true | true |
|
||||
| tst.ts:65:34:65:53 | {stillMyUnion: true} | { stillMyUnion: true; } |
|
||||
| tst.ts:65:49:65:52 | true | true |
|
||||
| tst.ts:66:13:66:19 | MyUnion | MyUnion |
|
||||
| tst.ts:68:6:68:13 | MyUnion2 | MyUnion2 |
|
||||
| tst.ts:68:17:68:23 | MyUnion | MyUnion |
|
||||
| tst.ts:68:17:68:48 | MyUnion ... : true} | MyUnion \| { yetAnotherType: true; } |
|
||||
| tst.ts:68:27:68:48 | {yetAno ... : true} | { yetAnotherType: true; } |
|
||||
| tst.ts:68:44:68:47 | true | true |
|
||||
| tst.ts:69:13:69:20 | MyUnion2 | MyUnion2 |
|
||||
| type_alias.ts:1:6:1:6 | B | boolean |
|
||||
| type_alias.ts:1:10:1:16 | boolean | boolean |
|
||||
| type_alias.ts:3:8:3:8 | B | boolean |
|
||||
@@ -336,6 +362,8 @@ referenceDefinition
|
||||
| I<S> | type_definitions.ts:3:1:5:1 | interfa ... x: S;\\n} |
|
||||
| I<number> | type_definitions.ts:3:1:5:1 | interfa ... x: S;\\n} |
|
||||
| Json | type_alias.ts:9:1:15:13 | type Js ... Json[]; |
|
||||
| MyUnion | tst.ts:65:1:65:54 | type My ... true}; |
|
||||
| MyUnion2 | tst.ts:68:1:68:49 | type My ... true}; |
|
||||
| NonAbstractDummy | tst.ts:54:1:56:1 | interfa ... mber;\\n} |
|
||||
| ValueOrArray<T> | type_alias.ts:5:1:5:50 | type Va ... ay<T>>; |
|
||||
| ValueOrArray<number> | type_alias.ts:5:1:5:50 | type Va ... ay<T>>; |
|
||||
@@ -415,3 +443,8 @@ unionIndex
|
||||
| { [key: string]: any; } | 1 | string \| { [key: string]: any; } |
|
||||
| { [key: string]: any; } | 2 | VirtualNode \| { [key: string]: any; } |
|
||||
| { [property: string]: Json; } | 4 | string \| number \| boolean \| { [property: string... |
|
||||
| { myUnion: true; } | 0 | MyUnion \| { yetAnotherType: true; } |
|
||||
| { myUnion: true; } | 0 | { myUnion: true; } \| { stillMyUnion: true; } |
|
||||
| { stillMyUnion: true; } | 1 | MyUnion \| { yetAnotherType: true; } |
|
||||
| { stillMyUnion: true; } | 1 | { myUnion: true; } \| { stillMyUnion: true; } |
|
||||
| { yetAnotherType: true; } | 2 | MyUnion \| { yetAnotherType: true; } |
|
||||
|
||||
@@ -61,3 +61,9 @@ interface HasArea {
|
||||
|
||||
// abstract construct signature!
|
||||
let Ctor: abstract new () => HasArea = Shape;
|
||||
|
||||
type MyUnion = {myUnion: true} | {stillMyUnion: true};
|
||||
let union1: MyUnion = {myUnion: true};
|
||||
|
||||
type MyUnion2 = MyUnion | {yetAnotherType: true};
|
||||
let union2: MyUnion2 = {yetAnotherType: true};
|
||||
Reference in New Issue
Block a user