{ "type": "Program", "statements": [ { "type": "TSInterfaceDeclaration", "body": { "type": "TSInterfaceBody", "body": [ { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 6 } } }, "typeAnnotation": { "type": "NamedType", "name": { "type": "Identifier", "name": "u8", "decorators": [], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 10 } } }, "isNullable": false, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 10 } } }, "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 11 } } }, { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 6 } } }, "typeAnnotation": { "type": "NamedType", "name": { "type": "Identifier", "name": "Array", "decorators": [], "loc": { "start": { "line": 19, "column": 16 }, "end": { "line": 19, "column": 20 } } }, "typeParameters": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "NamedType", "name": { "type": "Identifier", "name": "i32", "decorators": [], "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 11 } } }, "isNullable": false, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 11 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "isNullable": true, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 20 } } }, "loc": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 21 } } }, { "type": "TSMethodSignature", "computed": false, "optional": false, "key": { "type": "Identifier", "name": "c", "decorators": [], "loc": { "start": { "line": 20, "column": 5 }, "end": { "line": 20, "column": 6 } } }, "params": [ { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSFunctionType", "params": [ { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "NamedType", "name": { "type": "Identifier", "name": "Array", "decorators": [], "loc": { "start": { "line": 20, "column": 19 }, "end": { "line": 20, "column": 20 } } }, "typeParameters": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "NamedType", "name": { "type": "Identifier", "name": "i64", "decorators": [], "loc": { "start": { "line": 20, "column": 14 }, "end": { "line": 20, "column": 17 } } }, "isNullable": false, "loc": { "start": { "line": 20, "column": 14 }, "end": { "line": 20, "column": 17 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "isNullable": false, "loc": { "start": { "line": 20, "column": 14 }, "end": { "line": 20, "column": 20 } } }, "decorators": [], "loc": { "start": { "line": 20, "column": 11 }, "end": { "line": 20, "column": 12 } } }, { "type": "Identifier", "name": "b", "typeAnnotation": { "type": "NamedType", "name": { "type": "Identifier", "name": "void", "decorators": [], "loc": { "start": { "line": 20, "column": 24 }, "end": { "line": 20, "column": 28 } } }, "isNullable": false, "loc": { "start": { "line": 20, "column": 24 }, "end": { "line": 20, "column": 28 } } }, "decorators": [], "loc": { "start": { "line": 20, "column": 21 }, "end": { "line": 20, "column": 22 } } } ], "returnType": { "type": "NamedType", "name": { "type": "Identifier", "name": "u64", "decorators": [], "loc": { "start": { "line": 20, "column": 33 }, "end": { "line": 20, "column": 36 } } }, "isNullable": false, "loc": { "start": { "line": 20, "column": 33 }, "end": { "line": 20, "column": 36 } } }, "loc": { "start": { "line": 20, "column": 10 }, "end": { "line": 20, "column": 36 } } }, "decorators": [], "loc": { "start": { "line": 20, "column": 7 }, "end": { "line": 20, "column": 8 } } }, { "type": "Identifier", "name": "b", "typeAnnotation": { "type": "NamedType", "name": { "type": "Identifier", "name": "Array", "decorators": [], "loc": { "start": { "line": 20, "column": 46 }, "end": { "line": 20, "column": 47 } } }, "typeParameters": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "NamedType", "name": { "type": "Identifier", "name": "u8", "decorators": [], "loc": { "start": { "line": 20, "column": 42 }, "end": { "line": 20, "column": 44 } } }, "isNullable": false, "loc": { "start": { "line": 20, "column": 42 }, "end": { "line": 20, "column": 44 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "isNullable": false, "loc": { "start": { "line": 20, "column": 42 }, "end": { "line": 20, "column": 47 } } }, "optional": true, "decorators": [], "loc": { "start": { "line": 20, "column": 38 }, "end": { "line": 20, "column": 39 } } } ], "typeAnnotation": { "type": "NamedType", "name": { "type": "Identifier", "name": "bool", "decorators": [], "loc": { "start": { "line": 20, "column": 49 }, "end": { "line": 20, "column": 53 } } }, "isNullable": false, "loc": { "start": { "line": 20, "column": 49 }, "end": { "line": 20, "column": 53 } } }, "loc": { "start": { "line": 20, "column": 5 }, "end": { "line": 20, "column": 54 } } }, { "type": "TSMethodSignature", "computed": false, "optional": false, "key": { "type": "Identifier", "name": "k", "decorators": [], "loc": { "start": { "line": 21, "column": 5 }, "end": { "line": 21, "column": 6 } } }, "params": [ { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "NamedType", "name": { "type": "Identifier", "name": "v128", "decorators": [], "loc": { "start": { "line": 21, "column": 16 }, "end": { "line": 21, "column": 20 } } }, "isNullable": false, "loc": { "start": { "line": 21, "column": 16 }, "end": { "line": 21, "column": 20 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 13 }, "end": { "line": 21, "column": 14 } } } ], "typeParameters": { "type": "TSTypeParameterDeclaration", "params": [ { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "R", "decorators": [], "loc": { "start": { "line": 21, "column": 7 }, "end": { "line": 21, "column": 8 } } }, "loc": { "start": { "line": 21, "column": 7 }, "end": { "line": 21, "column": 9 } } }, { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "U", "decorators": [], "loc": { "start": { "line": 21, "column": 10 }, "end": { "line": 21, "column": 11 } } }, "loc": { "start": { "line": 21, "column": 10 }, "end": { "line": 21, "column": 12 } } } ], "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 12 } } }, "typeAnnotation": { "type": "NamedType", "name": { "type": "Identifier", "name": "i8", "decorators": [], "loc": { "start": { "line": 21, "column": 23 }, "end": { "line": 21, "column": 25 } } }, "isNullable": false, "loc": { "start": { "line": 21, "column": 23 }, "end": { "line": 21, "column": 25 } } }, "loc": { "start": { "line": 21, "column": 5 }, "end": { "line": 21, "column": 26 } } }, { "type": "TSIndexSignature", "parameters": { "type": "Identifier", "name": "key", "typeAnnotation": { "type": "NamedType", "name": { "type": "Identifier", "name": "i8", "decorators": [], "loc": { "start": { "line": 22, "column": 11 }, "end": { "line": 22, "column": 13 } } }, "isNullable": false, "loc": { "start": { "line": 22, "column": 11 }, "end": { "line": 22, "column": 13 } } }, "decorators": [], "loc": { "start": { "line": 22, "column": 6 }, "end": { "line": 22, "column": 9 } } }, "typeAnnotation": { "type": "NamedType", "name": { "type": "Identifier", "name": "v128", "decorators": [], "loc": { "start": { "line": 22, "column": 16 }, "end": { "line": 22, "column": 20 } } }, "isNullable": false, "loc": { "start": { "line": 22, "column": 16 }, "end": { "line": 22, "column": 20 } } }, "readonly": false, "loc": { "start": { "line": 22, "column": 5 }, "end": { "line": 23, "column": 2 } } } ], "loc": { "start": { "line": 17, "column": 39 }, "end": { "line": 23, "column": 2 } } }, "id": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 14 } } }, "extends": [], "typeParameters": { "type": "TSTypeParameterDeclaration", "params": [ { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "T", "decorators": [], "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 16 } } }, "default": { "type": "NamedType", "name": { "type": "Identifier", "name": "i32", "decorators": [], "loc": { "start": { "line": 17, "column": 19 }, "end": { "line": 17, "column": 22 } } }, "isNullable": false, "loc": { "start": { "line": 17, "column": 19 }, "end": { "line": 17, "column": 22 } } }, "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 23 } } }, { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "Z", "decorators": [], "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 25 } } }, "default": { "type": "NamedType", "name": { "type": "Identifier", "name": "externref", "decorators": [], "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 37 } } }, "isNullable": false, "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 37 } } }, "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 38 } } } ], "loc": { "start": { "line": 17, "column": 14 }, "end": { "line": 17, "column": 38 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 23, "column": 2 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 24, "column": 1 } } }