UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,768 lines 316 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "isArray", "range": [ 9, 16 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 16 } } }, "imported": { "type": "Identifier", "name": "isArray", "range": [ 9, 16 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 16 } } }, "range": [ 9, 16 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 16 } } } ], "source": { "type": "Literal", "value": "../util/isArray", "raw": "'../util/isArray'", "range": [ 24, 41 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 41 } } }, "range": [ 0, 42 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 42 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "ArrayObservable", "range": [ 52, 67 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 24 } } }, "imported": { "type": "Identifier", "name": "ArrayObservable", "range": [ 52, 67 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 24 } } }, "range": [ 52, 67 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 24 } } } ], "source": { "type": "Literal", "value": "../observable/ArrayObservable", "raw": "'../observable/ArrayObservable'", "range": [ 75, 106 ], "loc": { "start": { "line": 2, "column": 32 }, "end": { "line": 2, "column": 63 } } }, "range": [ 43, 107 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 64 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 117, 132 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } }, "imported": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 117, 132 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } }, "range": [ 117, 132 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } } ], "source": { "type": "Literal", "value": "../OuterSubscriber", "raw": "'../OuterSubscriber'", "range": [ 140, 160 ], "loc": { "start": { "line": 3, "column": 32 }, "end": { "line": 3, "column": 52 } } }, "range": [ 108, 161 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 53 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "subscribeToResult", "range": [ 171, 188 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 26 } } }, "imported": { "type": "Identifier", "name": "subscribeToResult", "range": [ 171, 188 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 26 } } }, "range": [ 171, 188 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 26 } } } ], "source": { "type": "Literal", "value": "../util/subscribeToResult", "raw": "'../util/subscribeToResult'", "range": [ 196, 223 ], "loc": { "start": { "line": 4, "column": 34 }, "end": { "line": 4, "column": 61 } } }, "range": [ 162, 224 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 62 } }, "trailingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 225, 261 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 36 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "race", "range": [ 278, 282 ], "loc": { "start": { "line": 6, "column": 16 }, "end": { "line": 6, "column": 20 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "observables", "range": [ 295, 306 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 19 } } }, "init": { "type": "ArrayExpression", "elements": [], "range": [ 309, 311 ], "loc": { "start": { "line": 7, "column": 22 }, "end": { "line": 7, "column": 24 } } }, "range": [ 295, 311 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 24 } } } ], "kind": "var", "range": [ 291, 312 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 25 } } }, { "type": "ForStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "_i", "range": [ 326, 328 ], "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 15 } } }, "init": { "type": "Literal", "value": 0, "raw": "0", "range": [ 331, 332 ], "loc": { "start": { "line": 8, "column": 18 }, "end": { "line": 8, "column": 19 } } }, "range": [ 326, 332 ], "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 19 } } } ], "kind": "var", "range": [ 322, 332 ], "loc": { "start": { "line": 8, "column": 9 }, "end": { "line": 8, "column": 19 } } }, "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "_i", "range": [ 334, 336 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 23 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "arguments", "range": [ 339, 348 ], "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 35 } } }, "property": { "type": "Identifier", "name": "length", "range": [ 349, 355 ], "loc": { "start": { "line": 8, "column": 36 }, "end": { "line": 8, "column": 42 } } }, "range": [ 339, 355 ], "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 42 } } }, "range": [ 334, 355 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 42 } } }, "update": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "_i", "range": [ 357, 359 ], "loc": { "start": { "line": 8, "column": 44 }, "end": { "line": 8, "column": 46 } } }, "prefix": false, "range": [ 357, 361 ], "loc": { "start": { "line": 8, "column": 44 }, "end": { "line": 8, "column": 48 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "observables", "range": [ 373, 384 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 19 } } }, "property": { "type": "BinaryExpression", "operator": "-", "left": { "type": "Identifier", "name": "_i", "range": [ 385, 387 ], "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 22 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 390, 391 ], "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 26 } } }, "range": [ 385, 391 ], "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 26 } } }, "range": [ 373, 392 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 27 } } }, "right": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "arguments", "range": [ 395, 404 ], "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 39 } } }, "property": { "type": "Identifier", "name": "_i", "range": [ 405, 407 ], "loc": { "start": { "line": 9, "column": 40 }, "end": { "line": 9, "column": 42 } } }, "range": [ 395, 408 ], "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 43 } } }, "range": [ 373, 408 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 43 } } }, "range": [ 373, 409 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 44 } } } ], "range": [ 363, 415 ], "loc": { "start": { "line": 8, "column": 50 }, "end": { "line": 10, "column": 5 } } }, "range": [ 317, 415 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 10, "column": 5 } }, "trailingComments": [ { "type": "Line", "value": " if the only argument is an array, it was most likely called with", "range": [ 420, 487 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 71 } } }, { "type": "Line", "value": " `pair([obs1, obs2, ...])`", "range": [ 492, 520 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 32 } } } ] }, { "type": "IfStatement", "test": { "type": "LogicalExpression", "operator": "&&", "left": { "type": "BinaryExpression", "operator": "===", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "observables", "range": [ 529, 540 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 19 } } }, "property": { "type": "Identifier", "name": "length", "range": [ 541, 547 ], "loc": { "start": { "line": 13, "column": 20 }, "end": { "line": 13, "column": 26 } } }, "range": [ 529, 547 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 26 } } }, "right": { "type": "Literal", "value": 1, "raw": "1", "range": [ 552, 553 ], "loc": { "start": { "line": 13, "column": 31 }, "end": { "line": 13, "column": 32 } } }, "range": [ 529, 553 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 32 } } }, "right": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "isArray", "range": [ 557, 564 ], "loc": { "start": { "line": 13, "column": 36 }, "end": { "line": 13, "column": 43 } } }, "arguments": [ { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "observables", "range": [ 565, 576 ], "loc": { "start": { "line": 13, "column": 44 }, "end": { "line": 13, "column": 55 } } }, "property": { "type": "Literal", "value": 0, "raw": "0", "range": [ 577, 578 ], "loc": { "start": { "line": 13, "column": 56 }, "end": { "line": 13, "column": 57 } } }, "range": [ 565, 579 ], "loc": { "start": { "line": 13, "column": 44 }, "end": { "line": 13, "column": 58 } } } ], "range": [ 557, 580 ], "loc": { "start": { "line": 13, "column": 36 }, "end": { "line": 13, "column": 59 } } }, "range": [ 529, 580 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 59 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "observables", "range": [ 592, 603 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 19 } } }, "right": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "observables", "range": [ 606, 617 ], "loc": { "start": { "line": 14, "column": 22 }, "end": { "line": 14, "column": 33 } } }, "property": { "type": "Literal", "value": 0, "raw": "0", "range": [ 618, 619 ], "loc": { "start": { "line": 14, "column": 34 }, "end": { "line": 14, "column": 35 } } }, "range": [ 606, 620 ], "loc": { "start": { "line": 14, "column": 22 }, "end": { "line": 14, "column": 36 } } }, "range": [ 592, 620 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 36 } } }, "range": [ 592, 621 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 37 } } } ], "range": [ 582, 627 ], "loc": { "start": { "line": 13, "column": 61 }, "end": { "line": 15, "column": 5 } } }, "alternate": null, "range": [ 525, 627 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 15, "column": 5 } }, "leadingComments": [ { "type": "Line", "value": " if the only argument is an array, it was most likely called with", "range": [ 420, 487 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 71 } } }, { "type": "Line", "value": " `pair([obs1, obs2, ...])`", "range": [ 492, 520 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 32 } } } ] }, { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 639, 643 ], "loc": { "start": { "line": 16, "column": 11 }, "end": { "line": 16, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 644, 648 ], "loc": { "start": { "line": 16, "column": 16 }, "end": { "line": 16, "column": 20 } } }, "range": [ 639, 648 ], "loc": { "start": { "line": 16, "column": 11 }, "end": { "line": 16, "column": 20 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 649, 653 ], "loc": { "start": { "line": 16, "column": 21 }, "end": { "line": 16, "column": 25 } } }, "range": [ 639, 653 ], "loc": { "start": { "line": 16, "column": 11 }, "end": { "line": 16, "column": 25 } } }, "arguments": [ { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "raceStatic", "range": [ 654, 664 ], "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 36 } } }, "property": { "type": "Identifier", "name": "apply", "range": [ 665, 670 ], "loc": { "start": { "line": 16, "column": 37 }, "end": { "line": 16, "column": 42 } } }, "range": [ 654, 670 ], "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 42 } } }, "arguments": [ { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Literal", "value": 0, "raw": "0", "range": [ 676, 677 ], "loc": { "start": { "line": 16, "column": 48 }, "end": { "line": 16, "column": 49 } } }, "prefix": true, "range": [ 671, 677 ], "loc": { "start": { "line": 16, "column": 43 }, "end": { "line": 16, "column": 49 } } }, { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ArrayExpression", "elements": [ { "type": "ThisExpression", "range": [ 680, 684 ], "loc": { "start": { "line": 16, "column": 52 }, "end": { "line": 16, "column": 56 } } } ], "range": [ 679, 685 ], "loc": { "start": { "line": 16, "column": 51 }, "end": { "line": 16, "column": 57 } } }, "property": { "type": "Identifier", "name": "concat", "range": [ 686, 692 ], "loc": { "start": { "line": 16, "column": 58 }, "end": { "line": 16, "column": 64 } } }, "range": [ 679, 692 ], "loc": { "start": { "line": 16, "column": 51 }, "end": { "line": 16, "column": 64 } } }, "arguments": [ { "type": "Identifier", "name": "observables", "range": [ 693, 704 ], "loc": { "start": { "line": 16, "column": 65 }, "end": { "line": 16, "column": 76 } } } ], "range": [ 679, 705 ], "loc": { "start": { "line": 16, "column": 51 }, "end": { "line": 16, "column": 77 } } } ], "range": [ 654, 706 ], "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 78 } } } ], "range": [ 639, 707 ], "loc": { "start": { "line": 16, "column": 11 }, "end": { "line": 16, "column": 79 } } }, "range": [ 632, 708 ], "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 80 } } } ], "range": [ 285, 710 ], "loc": { "start": { "line": 6, "column": 23 }, "end": { "line": 17, "column": 1 } } }, "generator": false, "expression": false, "range": [ 269, 710 ], "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 17, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 225, 261 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 36 } } } ], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 262, 710 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 17, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 225, 261 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 36 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "nam