forked from brucehuke/ts-testcase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomplex_object.ts
32 lines (22 loc) · 905 Bytes
/
complex_object.ts
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
31
32
class ParamsObject {
key: string = ''
val: string = ''
}
let pObj: ParamsObject = new ParamsObject()
pObj.key = 'a'
pObj.val = 'aaaa'
console.log('~~~~~~pObj',pObj.key, pObj.val)
let arr: Array<ParamsObject> = []
// [ INFO] [09:51:35:966 - EDF3BB40]: [ INFO] warning: failed to link import function (env, strcmp)[ INFO]
// 已修复
arr.push(pObj)
class RouteInfo {
package: string = ''
path: string = ''
// [ERROR] console - Type mismatch in ExpressionStatement
params: Array<ParamsObject> = []
}
let route: RouteInfo = new RouteInfo()
// [ERROR] console - Aborted(Assertion failed: isStruct(), at: /home/runner/work/binaryen.js/binaryen.js/binaryen/src/wasm/wasm-type.cpp,1330,getStruct). Build with -sASSERTIONS for more info.
route.params.push(pObj)
console.log('~~~~~~~~~route.params len', route.params.length)