UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,353 lines (1,352 loc) 229 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Observable", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, "imported": { "type": "Identifier", "name": "Observable", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } } ], "source": { "type": "Literal", "value": "../Observable", "raw": "'../Observable'", "range": [ 27, 42 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 42 } } }, "range": [ 0, 43 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 43 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "ScalarObservable", "range": [ 53, 69 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 25 } } }, "imported": { "type": "Identifier", "name": "ScalarObservable", "range": [ 53, 69 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 25 } } }, "range": [ 53, 69 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 25 } } } ], "source": { "type": "Literal", "value": "./ScalarObservable", "raw": "'./ScalarObservable'", "range": [ 77, 97 ], "loc": { "start": { "line": 2, "column": 33 }, "end": { "line": 2, "column": 53 } } }, "range": [ 44, 98 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 54 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "EmptyObservable", "range": [ 108, 123 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } }, "imported": { "type": "Identifier", "name": "EmptyObservable", "range": [ 108, 123 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } }, "range": [ 108, 123 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } } ], "source": { "type": "Literal", "value": "./EmptyObservable", "raw": "'./EmptyObservable'", "range": [ 131, 150 ], "loc": { "start": { "line": 3, "column": 32 }, "end": { "line": 3, "column": 51 } } }, "range": [ 99, 151 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 52 } }, "trailingComments": [ { "type": "Block", "value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n ", "range": [ 152, 246 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 8, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "ArrayLikeObservable", "range": [ 258, 277 ], "loc": { "start": { "line": 9, "column": 11 }, "end": { "line": 9, "column": 30 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "_super", "range": [ 291, 297 ], "loc": { "start": { "line": 9, "column": 44 }, "end": { "line": 9, "column": 50 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "__extends", "range": [ 305, 314 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 13 } } }, "arguments": [ { "type": "Identifier", "name": "ArrayLikeObservable", "range": [ 315, 334 ], "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 10, "column": 33 } } }, { "type": "Identifier", "name": "_super", "range": [ 336, 342 ], "loc": { "start": { "line": 10, "column": 35 }, "end": { "line": 10, "column": 41 } } } ], "range": [ 305, 343 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 42 } } }, "range": [ 305, 344 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 43 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "ArrayLikeObservable", "range": [ 358, 377 ], "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 32 } } }, "params": [ { "type": "Identifier", "name": "arrayLike", "range": [ 378, 387 ], "loc": { "start": { "line": 11, "column": 33 }, "end": { "line": 11, "column": 42 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 389, 398 ], "loc": { "start": { "line": 11, "column": 44 }, "end": { "line": 11, "column": 53 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "_super", "range": [ 410, 416 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 14 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 417, 421 ], "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 19 } } }, "range": [ 410, 421 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 19 } } }, "arguments": [ { "type": "ThisExpression", "range": [ 422, 426 ], "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 24 } } } ], "range": [ 410, 427 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 25 } } }, "range": [ 410, 428 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 26 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 437, 441 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } }, "property": { "type": "Identifier", "name": "arrayLike", "range": [ 442, 451 ], "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 22 } } }, "range": [ 437, 451 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 22 } } }, "right": { "type": "Identifier", "name": "arrayLike", "range": [ 454, 463 ], "loc": { "start": { "line": 13, "column": 25 }, "end": { "line": 13, "column": 34 } } }, "range": [ 437, 463 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 34 } } }, "range": [ 437, 464 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 35 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 473, 477 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 12 } } }, "property": { "type": "Identifier", "name": "scheduler", "range": [ 478, 487 ], "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 22 } } }, "range": [ 473, 487 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 22 } } }, "right": { "type": "Identifier", "name": "scheduler", "range": [ 490, 499 ], "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 34 } } }, "range": [ 473, 499 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 34 } } }, "range": [ 473, 500 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 35 } } }, { "type": "IfStatement", "test": { "type": "LogicalExpression", "operator": "&&", "left": { "type": "UnaryExpression", "operator": "!", "argument": { "type": "Identifier", "name": "scheduler", "range": [ 514, 523 ], "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 22 } } }, "prefix": true, "range": [ 513, 523 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 22 } } }, "right": { "type": "BinaryExpression", "operator": "===", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "arrayLike", "range": [ 527, 536 ], "loc": { "start": { "line": 15, "column": 26 }, "end": { "line": 15, "column": 35 } } }, "property": { "type": "Identifier", "name": "length", "range": [ 537, 543 ], "loc": { "start": { "line": 15, "column": 36 }, "end": { "line": 15, "column": 42 } } }, "range": [ 527, 543 ], "loc": { "start": { "line": 15, "column": 26 }, "end": { "line": 15, "column": 42 } } }, "right": { "type": "Literal", "value": 1, "raw": "1", "range": [ 548, 549 ], "loc": { "start": { "line": 15, "column": 47 }, "end": { "line": 15, "column": 48 } } }, "range": [ 527, 549 ], "loc": { "start": { "line": 15, "column": 26 }, "end": { "line": 15, "column": 48 } } }, "range": [ 513, 549 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 48 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 565, 569 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 16 } } }, "property": { "type": "Identifier", "name": "_isScalar", "range": [ 570, 579 ], "loc": { "start": { "line": 16, "column": 17 }, "end": { "line": 16, "column": 26 } } }, "range": [ 565, 579 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 26 } } }, "right": { "type": "Literal", "value": true, "raw": "true", "range": [ 582, 586 ], "loc": { "start": { "line": 16, "column": 29 }, "end": { "line": 16, "column": 33 } } }, "range": [ 565, 586 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 33 } } }, "range": [ 565, 587 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 34 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 600, 604 ], "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 16 } } }, "property": { "type": "Identifier", "name": "value", "range": [ 605, 610 ], "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 22 } } }, "range": [ 600, 610 ], "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 22 } } }, "right": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "arrayLike", "range": [ 613, 622 ], "loc": { "start": { "line": 17, "column": 25 }, "end": { "line": 17, "column": 34 } } }, "property": { "type": "Literal", "value": 0, "raw": "0", "range": [ 623, 624 ], "loc": { "start": { "line": 17, "column": 35 }, "end": { "line": 17, "column": 36 } } }, "range": [ 613, 625 ], "loc": { "start": { "line": 17, "column": 25 }, "end": { "line": 17, "column": 37 } } }, "range": [ 600, 625 ], "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 37 } } }, "range": [ 600, 626 ], "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 38 } } } ], "range": [ 551, 636 ], "loc": { "start": { "line": 15, "column": 50 }, "end": { "line": 18, "column": 9 } } }, "alternate": null, "range": [ 509, 636 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 18, "column": 9 } } } ], "range": [ 400, 642 ], "loc": { "start": { "line": 11, "column": 55 }, "end": { "line": 19, "column": 5 } } }, "generator": false, "expression": false, "range": [ 349, 642 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 19, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "ArrayLikeObservable", "range": [ 647, 666 ], "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 23 } } }, "property": { "type": "Identifier", "name": "create", "range": [ 667, 673 ], "loc": { "start": { "line": 20, "column": 24 }, "end": { "line": 20, "column": 30 } } }, "range": [ 647, 673 ], "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 30 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "arrayLike", "range": [