UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,872 lines (1,871 loc) 830 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "ArrayObservable", "range": [ 9, 24 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 24 } } }, "imported": { "type": "Identifier", "name": "ArrayObservable", "range": [ 9, 24 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 24 } } }, "range": [ 9, 24 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 24 } } } ], "source": { "type": "Literal", "value": "../observable/ArrayObservable", "raw": "'../observable/ArrayObservable'", "range": [ 32, 63 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 63 } } }, "range": [ 0, 64 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 64 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "isArray", "range": [ 74, 81 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 16 } } }, "imported": { "type": "Identifier", "name": "isArray", "range": [ 74, 81 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 16 } } }, "range": [ 74, 81 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 16 } } } ], "source": { "type": "Literal", "value": "../util/isArray", "raw": "'../util/isArray'", "range": [ 89, 106 ], "loc": { "start": { "line": 2, "column": 24 }, "end": { "line": 2, "column": 41 } } }, "range": [ 65, 107 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 42 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Subscriber", "range": [ 117, 127 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 19 } } }, "imported": { "type": "Identifier", "name": "Subscriber", "range": [ 117, 127 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 19 } } }, "range": [ 117, 127 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 19 } } } ], "source": { "type": "Literal", "value": "../Subscriber", "raw": "'../Subscriber'", "range": [ 135, 150 ], "loc": { "start": { "line": 3, "column": 27 }, "end": { "line": 3, "column": 42 } } }, "range": [ 108, 151 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 43 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 161, 176 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 24 } } }, "imported": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 161, 176 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 24 } } }, "range": [ 161, 176 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 24 } } } ], "source": { "type": "Literal", "value": "../OuterSubscriber", "raw": "'../OuterSubscriber'", "range": [ 184, 204 ], "loc": { "start": { "line": 4, "column": 32 }, "end": { "line": 4, "column": 52 } } }, "range": [ 152, 205 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 53 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "subscribeToResult", "range": [ 215, 232 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 26 } } }, "imported": { "type": "Identifier", "name": "subscribeToResult", "range": [ 215, 232 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 26 } } }, "range": [ 215, 232 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 26 } } } ], "source": { "type": "Literal", "value": "../util/subscribeToResult", "raw": "'../util/subscribeToResult'", "range": [ 240, 267 ], "loc": { "start": { "line": 5, "column": 34 }, "end": { "line": 5, "column": 61 } } }, "range": [ 206, 268 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 62 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "$$iterator", "range": [ 278, 288 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 19 } } }, "imported": { "type": "Identifier", "name": "$$iterator", "range": [ 278, 288 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 19 } } }, "range": [ 278, 288 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 19 } } } ], "source": { "type": "Literal", "value": "../symbol/iterator", "raw": "'../symbol/iterator'", "range": [ 296, 316 ], "loc": { "start": { "line": 6, "column": 27 }, "end": { "line": 6, "column": 47 } } }, "range": [ 269, 317 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 48 } }, "trailingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 318, 354 ], "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 36 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "zipProto", "range": [ 371, 379 ], "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 24 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "observables", "range": [ 392, 403 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 19 } } }, "init": { "type": "ArrayExpression", "elements": [], "range": [ 406, 408 ], "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 9, "column": 24 } } }, "range": [ 392, 408 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 24 } } } ], "kind": "var", "range": [ 388, 409 ], "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 25 } } }, { "type": "ForStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "_i", "range": [ 423, 425 ], "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 15 } } }, "init": { "type": "Literal", "value": 0, "raw": "0", "range": [ 428, 429 ], "loc": { "start": { "line": 10, "column": 18 }, "end": { "line": 10, "column": 19 } } }, "range": [ 423, 429 ], "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 19 } } } ], "kind": "var", "range": [ 419, 429 ], "loc": { "start": { "line": 10, "column": 9 }, "end": { "line": 10, "column": 19 } } }, "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "_i", "range": [ 431, 433 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 23 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "arguments", "range": [ 436, 445 ], "loc": { "start": { "line": 10, "column": 26 }, "end": { "line": 10, "column": 35 } } }, "property": { "type": "Identifier", "name": "length", "range": [ 446, 452 ], "loc": { "start": { "line": 10, "column": 36 }, "end": { "line": 10, "column": 42 } } }, "range": [ 436, 452 ], "loc": { "start": { "line": 10, "column": 26 }, "end": { "line": 10, "column": 42 } } }, "range": [ 431, 452 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 42 } } }, "update": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "_i", "range": [ 454, 456 ], "loc": { "start": { "line": 10, "column": 44 }, "end": { "line": 10, "column": 46 } } }, "prefix": false, "range": [ 454, 458 ], "loc": { "start": { "line": 10, "column": 44 }, "end": { "line": 10, "column": 48 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "observables", "range": [ 470, 481 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 19 } } }, "property": { "type": "BinaryExpression", "operator": "-", "left": { "type": "Identifier", "name": "_i", "range": [ 482, 484 ], "loc": { "start": { "line": 11, "column": 20 }, "end": { "line": 11, "column": 22 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 487, 488 ], "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 26 } } }, "range": [ 482, 488 ], "loc": { "start": { "line": 11, "column": 20 }, "end": { "line": 11, "column": 26 } } }, "range": [ 470, 489 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 27 } } }, "right": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "arguments", "range": [ 492, 501 ], "loc": { "start": { "line": 11, "column": 30 }, "end": { "line": 11, "column": 39 } } }, "property": { "type": "Identifier", "name": "_i", "range": [ 502, 504 ], "loc": { "start": { "line": 11, "column": 40 }, "end": { "line": 11, "column": 42 } } }, "range": [ 492, 505 ], "loc": { "start": { "line": 11, "column": 30 }, "end": { "line": 11, "column": 43 } } }, "range": [ 470, 505 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 43 } } }, "range": [ 470, 506 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 44 } } } ], "range": [ 460, 512 ], "loc": { "start": { "line": 10, "column": 50 }, "end": { "line": 12, "column": 5 } } }, "range": [ 414, 512 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 12, "column": 5 } } }, { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 524, 528 ], "loc": { "start": { "line": 13, "column": 11 }, "end": { "line": 13, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 529, 533 ], "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 20 } } }, "range": [ 524, 533 ], "loc": { "start": { "line": 13, "column": 11 }, "end": { "line": 13, "column": 20 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 534, 538 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 25 } } }, "range": [ 524, 538 ], "loc": { "start": { "line": 13, "column": 11 }, "end": { "line": 13, "column": 25 } } }, "arguments": [ { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "zipStatic", "range": [ 539, 548 ], "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 35 } } }, "property": { "type": "Identifier", "name": "apply", "range": [ 549, 554 ], "loc": { "start": { "line": 13, "column": 36 }, "end": { "line": 13, "column": 41 } } }, "range": [ 539, 554 ], "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 41 } } }, "arguments": [ { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Literal", "value": 0, "raw": "0", "range": [ 560, 561 ], "loc": { "start": { "line": 13, "column": 47 }, "end": { "line": 13, "column": 48 } } }, "prefix": true, "range": [ 555, 561 ], "loc": { "start": { "line": 13, "column": 42 }, "end": { "line": 13, "column": 48 } } }, { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ArrayExpression", "elements": [ { "type": "ThisExpression", "range": [ 564, 568 ], "loc": { "start": { "line": 13, "column": 51 }, "end": { "line": 13, "column": 55 } } } ], "range": [ 563, 569 ], "loc": { "start": { "line": 13, "column": 50 }, "end": { "line": 13, "column": 56 } } }, "property": { "type": "Identifier", "name": "concat", "range": [ 570, 576 ], "loc": { "start": { "line": 13, "column": 57 }, "end": { "line": 13, "column": 63 } } }, "range": [ 563, 576 ], "loc": { "start": { "line": 13, "column": 50 }, "end": { "line": 13, "column": 63 } } }, "arguments": [ { "type": "Identifier", "name": "observables", "range": [ 577, 588 ], "loc": { "start": { "line": 13, "column": 64 }, "end": { "line": 13, "column": 75 } } } ], "range": [ 563, 589 ], "loc": { "start": { "line": 13, "column": 50 }, "end": { "line": 13, "column": 76 } } } ], "range": [ 539, 590 ], "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 77 } } } ], "range": [ 524, 591 ], "loc": { "start": { "line": 13, "column": 11 }, "end": { "line": 13, "column": 78 } } }, "range": [ 517, 592 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 79 } } } ], "range": [ 382, 594 ], "loc": { "start": { "line": 8, "column": 27 }, "end": { "line": 14, "column": 1 } } }, "generator": false, "expression": false, "range": [ 362, 594 ], "loc": { "start": { "line": 8, "column": 7 }, "end": { "line": 14, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 318, 354 ], "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 36 } } } ], "trailingComments": [ { "type": "Block", "value": " tslint:enable:max-line-length ", "range": [ 595, 630 ], "loc": { "start": { "line": 15, "column": 0 }, "end": { "line": 15, "column": 35 } } }, { "type": "Block", "value": "*\n * @param observables\n * @return {Observable<R>}\n * @static true\n * @name zip\n * @owner Observable\n ", "range": [ 631, 737 ], "loc": { "start": { "line": 16, "column": 0 }, "end": { "line": 22, "column": 3 } } } ] }, "specifiers": [], "source": null, "range": [ 355, 594 ], "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 14, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 318, 354 ], "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 36 } } } ], "trailingComments": [ { "type": "Block", "value": " tslint:enable:max-line-length ", "range": [ 595, 630 ], "loc": { "start": { "line": 15, "column": 0 }, "end": { "line": 15, "column": 35 } } }, { "type": "Block", "value": "*\n * @param observables\n * @return {Observable<R>}\n * @static true\n * @name zip\n * @owner Observable\n ", "range": [ 631, 737 ], "loc": { "start": { "line": 16, "column": 0 }, "end": { "line": 22, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "zipStatic", "range": [ 754, 763 ], "loc": { "start": { "line": 23, "column": 16 }, "end": { "line": 23, "column": 25 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "observables", "range": [ 776, 787 ], "loc": { "start": { "line": 24, "column": 8 }, "end": { "line": 24, "column": 19 } } }, "init": { "type": "ArrayExpression", "elements": [], "range": [ 790, 792 ], "loc": { "start": { "line": 24, "column": 22 }, "end": { "line": 24, "column": 24 } } }, "range": [ 776, 792 ], "loc": { "start": { "line": 24, "column": 8 }, "end": { "line": 24, "column": 24 } } } ], "kind": "var", "range": [ 772, 793 ], "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 25 } } }, { "type": "ForStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "_i", "range": [ 807, 809 ], "loc": { "start": { "line": 25, "column": 13 }, "end": { "line": 25, "column": 15 } } }, "init": { "type": "Literal", "value": 0, "raw": "0", "range": [ 812, 813 ], "loc": { "start": { "line": 25, "column": 18 }, "end": { "line": 25, "column": 19 } } }, "range": [ 807, 813 ], "loc": { "start": { "line": 25, "column": 13 }, "end": { "line": 25, "column": 19 } } } ], "kind": "var", "range": [ 803, 813 ], "loc": { "start": { "line": 25, "column": 9 }, "end": { "line": 25, "column": 19 } } }, "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "_i", "range": [ 815, 817 ], "loc": { "start": { "line": 25, "column": 21 }, "end": { "line": 25, "column": 23 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "arguments", "range": [ 820, 829 ], "loc": { "start": { "line": 25, "column": 26 }, "end": { "line": 25, "column": 35 } } }, "property": { "type": "Identifier", "name": "length", "range": [ 830, 836 ], "loc": { "start": { "line": 25, "column": 36 }, "end": { "line": 25, "column": 42 } } }, "range": [ 820, 836 ], "loc": { "start": { "line": 25, "column": 26 }, "end": { "line": 25, "column": 42 } } }, "range": [ 815, 836 ], "loc": { "start": { "line": 25, "column": 21 }, "end": { "line": 25, "column": 42 } } }, "update": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "_i", "range": [ 838, 840 ],