UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,396 lines (1,395 loc) 292 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 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "isScheduler", "range": [ 161, 172 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 20 } } }, "imported": { "type": "Identifier", "name": "isScheduler", "range": [ 161, 172 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 20 } } }, "range": [ 161, 172 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 20 } } } ], "source": { "type": "Literal", "value": "../util/isScheduler", "raw": "'../util/isScheduler'", "range": [ 180, 201 ], "loc": { "start": { "line": 4, "column": 28 }, "end": { "line": 4, "column": 49 } } }, "range": [ 152, 202 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 50 } }, "trailingComments": [ { "type": "Block", "value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n ", "range": [ 203, 297 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 9, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "ArrayObservable", "range": [ 309, 324 ], "loc": { "start": { "line": 10, "column": 11 }, "end": { "line": 10, "column": 26 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "_super", "range": [ 338, 344 ], "loc": { "start": { "line": 10, "column": 40 }, "end": { "line": 10, "column": 46 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "__extends", "range": [ 352, 361 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 13 } } }, "arguments": [ { "type": "Identifier", "name": "ArrayObservable", "range": [ 362, 377 ], "loc": { "start": { "line": 11, "column": 14 }, "end": { "line": 11, "column": 29 } } }, { "type": "Identifier", "name": "_super", "range": [ 379, 385 ], "loc": { "start": { "line": 11, "column": 31 }, "end": { "line": 11, "column": 37 } } } ], "range": [ 352, 386 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 38 } } }, "range": [ 352, 387 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 39 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "ArrayObservable", "range": [ 401, 416 ], "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 28 } } }, "params": [ { "type": "Identifier", "name": "array", "range": [ 417, 422 ], "loc": { "start": { "line": 12, "column": 29 }, "end": { "line": 12, "column": 34 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 424, 433 ], "loc": { "start": { "line": 12, "column": 36 }, "end": { "line": 12, "column": 45 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "_super", "range": [ 445, 451 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 14 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 452, 456 ], "loc": { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 19 } } }, "range": [ 445, 456 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 19 } } }, "arguments": [ { "type": "ThisExpression", "range": [ 457, 461 ], "loc": { "start": { "line": 13, "column": 20 }, "end": { "line": 13, "column": 24 } } } ], "range": [ 445, 462 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 25 } } }, "range": [ 445, 463 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 26 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 472, 476 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 12 } } }, "property": { "type": "Identifier", "name": "array", "range": [ 477, 482 ], "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 18 } } }, "range": [ 472, 482 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 18 } } }, "right": { "type": "Identifier", "name": "array", "range": [ 485, 490 ], "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 26 } } }, "range": [ 472, 490 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 26 } } }, "range": [ 472, 491 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 27 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 500, 504 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 12 } } }, "property": { "type": "Identifier", "name": "scheduler", "range": [ 505, 514 ], "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 22 } } }, "range": [ 500, 514 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 22 } } }, "right": { "type": "Identifier", "name": "scheduler", "range": [ 517, 526 ], "loc": { "start": { "line": 15, "column": 25 }, "end": { "line": 15, "column": 34 } } }, "range": [ 500, 526 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 34 } } }, "range": [ 500, 527 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 35 } } }, { "type": "IfStatement", "test": { "type": "LogicalExpression", "operator": "&&", "left": { "type": "UnaryExpression", "operator": "!", "argument": { "type": "Identifier", "name": "scheduler", "range": [ 541, 550 ], "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 22 } } }, "prefix": true, "range": [ 540, 550 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 22 } } }, "right": { "type": "BinaryExpression", "operator": "===", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "array", "range": [ 554, 559 ], "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 31 } } }, "property": { "type": "Identifier", "name": "length", "range": [ 560, 566 ], "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 38 } } }, "range": [ 554, 566 ], "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 38 } } }, "right": { "type": "Literal", "value": 1, "raw": "1", "range": [ 571, 572 ], "loc": { "start": { "line": 16, "column": 43 }, "end": { "line": 16, "column": 44 } } }, "range": [ 554, 572 ], "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 44 } } }, "range": [ 540, 572 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 44 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 588, 592 ], "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 16 } } }, "property": { "type": "Identifier", "name": "_isScalar", "range": [ 593, 602 ], "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 26 } } }, "range": [ 588, 602 ], "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 26 } } }, "right": { "type": "Literal", "value": true, "raw": "true", "range": [ 605, 609 ], "loc": { "start": { "line": 17, "column": 29 }, "end": { "line": 17, "column": 33 } } }, "range": [ 588, 609 ], "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 33 } } }, "range": [ 588, 610 ], "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 34 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 623, 627 ], "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 16 } } }, "property": { "type": "Identifier", "name": "value", "range": [ 628, 633 ], "loc": { "start": { "line": 18, "column": 17 }, "end": { "line": 18, "column": 22 } } }, "range": [ 623, 633 ], "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 22 } } }, "right": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "array", "range": [ 636, 641 ], "loc": { "start": { "line": 18, "column": 25 }, "end": { "line": 18, "column": 30 } } }, "property": { "type": "Literal", "value": 0, "raw": "0", "range": [ 642, 643 ], "loc": { "start": { "line": 18, "column": 31 }, "end": { "line": 18, "column": 32 } } }, "range": [ 636, 644 ], "loc": { "start": { "line": 18, "column": 25 }, "end": { "line": 18, "column": 33 } } }, "range": [ 623, 644 ], "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 33 } } }, "range": [ 623, 645 ], "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 34 } } } ], "range": [ 574, 655 ], "loc": { "start": { "line": 16, "column": 46 }, "end": { "line": 19, "column": 9 } } }, "alternate": null, "range": [ 536, 655 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 19, "column": 9 } } } ], "range": [ 435, 661 ], "loc": { "start": { "line": 12, "column": 47 }, "end": { "line": 20, "column": 5 } } }, "generator": false, "expression": false, "range": [ 392, 661 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 20, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "ArrayObservable", "range": [ 666, 681 ], "loc": { "start": { "line": 21, "column": 4