{ "type": "Program", "statements": [ { "type": "TSTypeAliasDeclaration", "id": { "type": "Identifier", "name": "TypedArray", "decorators": [], "loc": { "start": { "line": 16, "column": 6 }, "end": { "line": 16, "column": 16 } } }, "typeAnnotation": { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int8Array", "decorators": [], "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 14 } } }, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 18, "column": 6 } } }, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 18, "column": 6 } } }, { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int16Array", "decorators": [], "loc": { "start": { "line": 18, "column": 7 }, "end": { "line": 18, "column": 17 } } }, "loc": { "start": { "line": 18, "column": 7 }, "end": { "line": 19, "column": 6 } } }, "loc": { "start": { "line": 18, "column": 7 }, "end": { "line": 19, "column": 6 } } }, { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int32Array", "decorators": [], "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 19, "column": 17 } } }, "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 20, "column": 6 } } }, "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 20, "column": 6 } } }, { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Float32Array", "decorators": [], "loc": { "start": { "line": 20, "column": 7 }, "end": { "line": 20, "column": 19 } } }, "loc": { "start": { "line": 20, "column": 7 }, "end": { "line": 21, "column": 6 } } }, "loc": { "start": { "line": 20, "column": 7 }, "end": { "line": 21, "column": 6 } } }, { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Float64Array", "decorators": [], "loc": { "start": { "line": 21, "column": 7 }, "end": { "line": 21, "column": 19 } } }, "loc": { "start": { "line": 21, "column": 7 }, "end": { "line": 24, "column": 9 } } }, "loc": { "start": { "line": 21, "column": 7 }, "end": { "line": 24, "column": 9 } } } ], "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 24, "column": 9 } } }, "loc": { "start": { "line": 16, "column": 1 }, "end": { "line": 24, "column": 9 } } }, { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "ETSGLOBAL", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "superClass": null, "implements": [], "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "_$init$_", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "_$init$_", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "withArray", "decorators": [], "loc": { "start": { "line": 24, "column": 10 }, "end": { "line": 24, "column": 19 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "withArray", "decorators": [], "loc": { "start": { "line": 24, "column": 10 }, "end": { "line": 24, "column": 19 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "data", "typeAnnotation": { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "C", "decorators": [], "loc": { "start": { "line": 24, "column": 48 }, "end": { "line": 24, "column": 49 } } }, "loc": { "start": { "line": 24, "column": 48 }, "end": { "line": 24, "column": 51 } } }, "loc": { "start": { "line": 24, "column": 48 }, "end": { "line": 24, "column": 51 } } }, { "type": "ETSUndefinedType", "loc": { "start": { "line": 24, "column": 52 }, "end": { "line": 24, "column": 61 } } } ], "loc": { "start": { "line": 24, "column": 48 }, "end": { "line": 24, "column": 61 } } }, "decorators": [], "loc": { "start": { "line": 24, "column": 42 }, "end": { "line": 24, "column": 61 } } }, "loc": { "start": { "line": 24, "column": 42 }, "end": { "line": 24, "column": 61 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 24, "column": 64 }, "end": { "line": 24, "column": 71 } } }, "typeParameters": { "type": "TSTypeParameterDeclaration", "params": [ { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "C", "decorators": [], "loc": { "start": { "line": 24, "column": 20 }, "end": { "line": 24, "column": 21 } } }, "constraint": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "TypedArray", "decorators": [], "loc": { "start": { "line": 24, "column": 30 }, "end": { "line": 24, "column": 40 } } }, "loc": { "start": { "line": 24, "column": 30 }, "end": { "line": 24, "column": 41 } } }, "loc": { "start": { "line": 24, "column": 30 }, "end": { "line": 24, "column": 41 } } }, "loc": { "start": { "line": 24, "column": 20 }, "end": { "line": 24, "column": 41 } } } ], "loc": { "start": { "line": 24, "column": 19 }, "end": { "line": 24, "column": 41 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "len", "decorators": [], "loc": { "start": { "line": 25, "column": 9 }, "end": { "line": 25, "column": 12 } } }, "init": { "type": "LogicalExpression", "operator": "??", "left": { "type": "BlockExpression", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "gensym$_4", "decorators": [], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 3 } } }, "init": { "type": "Identifier", "name": "data", "decorators": [], "loc": { "start": { "line": 25, "column": 15 }, "end": { "line": 25, "column": 19 } } }, "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 3 } } } ], "kind": "let", "loc": { "start": { "line": 25, "column": 15 }, "end": { "line": 25, "column": 32 } } }, { "type": "ExpressionStatement", "expression": { "type": "ConditionalExpression", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "gensym$_4", "decorators": [], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 3 } } }, "right": { "type": "NullLiteral", "value": null, "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 3 } } }, "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 3 } } }, "consequent": { "type": "UndefinedLiteral", "value": undefined, "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 3 } } }, "alternate": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "gensym$_4", "decorators": [], "loc": { "start": { "line": 25, "column": 15 }, "end": { "line": 25, "column": 27 } } }, "property": { "type": "Identifier", "name": "length", "decorators": [], "loc": { "start": { "line": 25, "column": 21 }, "end": { "line": 25, "column": 27 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 25, "column": 15 }, "end": { "line": 25, "column": 27 } } }, "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 3 } } }, "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 3 } } } ], "loc": { "start": { "line": 25, "column": 15 }, "end": { "line": 25, "column": 32 } } }, "right": { "type": "NumberLiteral", "value": 0, "loc": { "start": { "line": 25, "column": 31 }, "end": { "line": 25, "column": 32 } } }, "loc": { "start": { "line": 25, "column": 15 }, "end": { "line": 25, "column": 32 } } }, "loc": { "start": { "line": 25, "column": 9 }, "end": { "line": 25, "column": 32 } } } ], "kind": "let", "loc": { "start": { "line": 25, "column": 5 }, "end": { "line": 25, "column": 33 } } }, { "type": "ReturnStatement", "argument": { "type": "BooleanLiteral", "value": true, "loc": { "start": { "line": 26, "column": 12 }, "end": { "line": 26, "column": 16 } } }, "loc": { "start": { "line": 26, "column": 5 }, "end": { "line": 26, "column": 17 } } } ], "loc": { "start": { "line": 24, "column": 72 }, "end": { "line": 27, "column": 2 } } }, "loc": { "start": { "line": 24, "column": 19 }, "end": { "line": 27, "column": 2 } } }, "loc": { "start": { "line": 24, "column": 19 }, "end": { "line": 27, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 24, "column": 1 }, "end": { "line": 27, "column": 2 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 27, "column": 2 } } }