UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,399 lines (1,398 loc) 480 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "root", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, "imported": { "type": "Identifier", "name": "root", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } } ], "source": { "type": "Literal", "value": "../util/root", "raw": "'../util/root'", "range": [ 21, 35 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 35 } } }, "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Observable", "range": [ 46, 56 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } }, "imported": { "type": "Identifier", "name": "Observable", "range": [ 46, 56 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } }, "range": [ 46, 56 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } } ], "source": { "type": "Literal", "value": "../Observable", "raw": "'../Observable'", "range": [ 64, 79 ], "loc": { "start": { "line": 2, "column": 27 }, "end": { "line": 2, "column": 42 } } }, "range": [ 37, 80 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 43 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "$$iterator", "range": [ 90, 100 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 19 } } }, "imported": { "type": "Identifier", "name": "$$iterator", "range": [ 90, 100 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 19 } } }, "range": [ 90, 100 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 19 } } } ], "source": { "type": "Literal", "value": "../symbol/iterator", "raw": "'../symbol/iterator'", "range": [ 108, 128 ], "loc": { "start": { "line": 3, "column": 27 }, "end": { "line": 3, "column": 47 } } }, "range": [ 81, 129 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 48 } }, "trailingComments": [ { "type": "Block", "value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n ", "range": [ 130, 224 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 8, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "IteratorObservable", "range": [ 236, 254 ], "loc": { "start": { "line": 9, "column": 11 }, "end": { "line": 9, "column": 29 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "_super", "range": [ 268, 274 ], "loc": { "start": { "line": 9, "column": 43 }, "end": { "line": 9, "column": 49 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "__extends", "range": [ 282, 291 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 13 } } }, "arguments": [ { "type": "Identifier", "name": "IteratorObservable", "range": [ 292, 310 ], "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 10, "column": 32 } } }, { "type": "Identifier", "name": "_super", "range": [ 312, 318 ], "loc": { "start": { "line": 10, "column": 34 }, "end": { "line": 10, "column": 40 } } } ], "range": [ 282, 319 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 41 } } }, "range": [ 282, 320 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 42 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "IteratorObservable", "range": [ 334, 352 ], "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 31 } } }, "params": [ { "type": "Identifier", "name": "iterator", "range": [ 353, 361 ], "loc": { "start": { "line": 11, "column": 32 }, "end": { "line": 11, "column": 40 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 363, 372 ], "loc": { "start": { "line": 11, "column": 42 }, "end": { "line": 11, "column": 51 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "_super", "range": [ 384, 390 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 14 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 391, 395 ], "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 19 } } }, "range": [ 384, 395 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 19 } } }, "arguments": [ { "type": "ThisExpression", "range": [ 396, 400 ], "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 24 } } } ], "range": [ 384, 401 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 25 } } }, "range": [ 384, 402 ], "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": [ 411, 415 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } }, "property": { "type": "Identifier", "name": "scheduler", "range": [ 416, 425 ], "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 22 } } }, "range": [ 411, 425 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 22 } } }, "right": { "type": "Identifier", "name": "scheduler", "range": [ 428, 437 ], "loc": { "start": { "line": 13, "column": 25 }, "end": { "line": 13, "column": 34 } } }, "range": [ 411, 437 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 34 } } }, "range": [ 411, 438 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 35 } } }, { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "iterator", "range": [ 451, 459 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 20 } } }, "right": { "type": "Literal", "value": null, "raw": "null", "range": [ 463, 467 ], "loc": { "start": { "line": 14, "column": 24 }, "end": { "line": 14, "column": 28 } } }, "range": [ 451, 467 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 28 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ThrowStatement", "argument": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "Error", "range": [ 493, 498 ], "loc": { "start": { "line": 15, "column": 22 }, "end": { "line": 15, "column": 27 } } }, "arguments": [ { "type": "Literal", "value": "iterator cannot be null.", "raw": "'iterator cannot be null.'", "range": [ 499, 525 ], "loc": { "start": { "line": 15, "column": 28 }, "end": { "line": 15, "column": 54 } } } ], "range": [ 489, 526 ], "loc": { "start": { "line": 15, "column": 18 }, "end": { "line": 15, "column": 55 } } }, "range": [ 483, 527 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 56 } } } ], "range": [ 469, 537 ], "loc": { "start": { "line": 14, "column": 30 }, "end": { "line": 16, "column": 9 } } }, "alternate": null, "range": [ 447, 537 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 16, "column": 9 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 546, 550 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 12 } } }, "property": { "type": "Identifier", "name": "iterator", "range": [ 551, 559 ], "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 21 } } }, "range": [ 546, 559 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 21 } } }, "right": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "getIterator", "range": [ 562, 573 ], "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 35 } } }, "arguments": [ { "type": "Identifier", "name": "iterator", "range": [ 574, 582 ], "loc": { "start": { "line": 17, "column": 36 }, "end": { "line": 17, "column": 44 } } } ], "range": [ 562, 583 ], "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 45 } } }, "range": [ 546, 583 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 45 } } }, "range": [ 546, 584 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 46 } } } ], "range": [ 374, 590 ], "loc": { "start": { "line": 11, "column": 53 }, "end": { "line": 18, "column": 5 } } }, "generator": false, "expression": false, "range": [ 325, 590 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 18, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "IteratorObservable", "range": [ 595, 613 ], "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 22 } } }, "property": { "type": "Identifier", "name": "create", "range": [ 614, 620 ], "loc": { "start": { "line": 19, "column": 23 }, "end": { "line": 19, "column": 29 } } }, "range": [ 595, 620 ], "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 29 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "iterator", "range": [ 633, 641 ], "loc": { "start": { "line": 19, "column": 42 }, "end": { "line": 19, "column": 50 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 643, 652 ], "loc": { "start": { "line": 19, "column": 52 }, "end": { "line": 19, "column": 61 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "IteratorObservable", "range": [ 675, 693 ], "loc": { "start": { "line": 20, "column": 19 }, "end": { "line": 20, "column": 37 } } }, "arguments": [ { "type": "Identifier", "name": "iterator", "range": [ 694, 702 ], "loc": { "start": { "line": 20, "column": 38 }, "end": { "line": 20, "column": 46 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 704, 713 ], "loc": { "start": { "line": 20, "column": 48 }, "end": { "line": 20, "column": 57 } } } ], "range": [ 671, 714 ], "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 58 } } }, "range": [ 664, 715 ], "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 59 } } } ], "range": [ 654, 721 ], "loc": { "start": { "line": 19, "column": 63 }, "end": { "line": 21, "column": 5 } } }, "generator": false, "expression": false, "range": [ 623, 721 ], "loc": { "start": { "line": 19, "column": 32 }, "end": { "line": 21, "column": 5 } } }, "range": [ 595, 721 ], "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 21, "column": 5 } } }, "range": [ 595, 722 ], "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 21, "column": 6 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "IteratorObservable", "range": [ 727, 745 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 22 } } }, "property": { "type": "Identifier", "name": "dispatch", "range": [ 746, 754 ], "loc": { "start": { "line": 22, "column": 23 }, "end": { "line": 22, "column": 31 } } }, "range": [ 727, 754 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 31 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "state", "range": [ 767, 772 ], "loc": { "start": { "line": 22, "column": 44 }, "end": { "line": 22, "column": 49 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [