UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,686 lines (1,685 loc) 293 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 9, 24 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 24 } } }, "imported": { "type": "Identifier", "name": "OuterSubscriber", "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": "../OuterSubscriber", "raw": "'../OuterSubscriber'", "range": [ 32, 52 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 52 } } }, "range": [ 0, 53 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 53 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "subscribeToResult", "range": [ 63, 80 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 26 } } }, "imported": { "type": "Identifier", "name": "subscribeToResult", "range": [ 63, 80 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 26 } } }, "range": [ 63, 80 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 26 } } } ], "source": { "type": "Literal", "value": "../util/subscribeToResult", "raw": "'../util/subscribeToResult'", "range": [ 88, 115 ], "loc": { "start": { "line": 2, "column": 34 }, "end": { "line": 2, "column": 61 } } }, "range": [ 54, 116 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 62 } }, "trailingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 117, 153 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "withLatestFrom", "range": [ 170, 184 ], "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 30 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "args", "range": [ 197, 201 ], "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 12 } } }, "init": { "type": "ArrayExpression", "elements": [], "range": [ 204, 206 ], "loc": { "start": { "line": 5, "column": 15 }, "end": { "line": 5, "column": 17 } } }, "range": [ 197, 206 ], "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 17 } } } ], "kind": "var", "range": [ 193, 207 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 18 } } }, { "type": "ForStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "_i", "range": [ 221, 223 ], "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 15 } } }, "init": { "type": "Literal", "value": 0, "raw": "0", "range": [ 226, 227 ], "loc": { "start": { "line": 6, "column": 18 }, "end": { "line": 6, "column": 19 } } }, "range": [ 221, 227 ], "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 19 } } } ], "kind": "var", "range": [ 217, 227 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 19 } } }, "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "_i", "range": [ 229, 231 ], "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 23 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "arguments", "range": [ 234, 243 ], "loc": { "start": { "line": 6, "column": 26 }, "end": { "line": 6, "column": 35 } } }, "property": { "type": "Identifier", "name": "length", "range": [ 244, 250 ], "loc": { "start": { "line": 6, "column": 36 }, "end": { "line": 6, "column": 42 } } }, "range": [ 234, 250 ], "loc": { "start": { "line": 6, "column": 26 }, "end": { "line": 6, "column": 42 } } }, "range": [ 229, 250 ], "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 42 } } }, "update": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "_i", "range": [ 252, 254 ], "loc": { "start": { "line": 6, "column": 44 }, "end": { "line": 6, "column": 46 } } }, "prefix": false, "range": [ 252, 256 ], "loc": { "start": { "line": 6, "column": 44 }, "end": { "line": 6, "column": 48 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "args", "range": [ 268, 272 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 12 } } }, "property": { "type": "BinaryExpression", "operator": "-", "left": { "type": "Identifier", "name": "_i", "range": [ 273, 275 ], "loc": { "start": { "line": 7, "column": 13 }, "end": { "line": 7, "column": 15 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 278, 279 ], "loc": { "start": { "line": 7, "column": 18 }, "end": { "line": 7, "column": 19 } } }, "range": [ 273, 279 ], "loc": { "start": { "line": 7, "column": 13 }, "end": { "line": 7, "column": 19 } } }, "range": [ 268, 280 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 20 } } }, "right": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "arguments", "range": [ 283, 292 ], "loc": { "start": { "line": 7, "column": 23 }, "end": { "line": 7, "column": 32 } } }, "property": { "type": "Identifier", "name": "_i", "range": [ 293, 295 ], "loc": { "start": { "line": 7, "column": 33 }, "end": { "line": 7, "column": 35 } } }, "range": [ 283, 296 ], "loc": { "start": { "line": 7, "column": 23 }, "end": { "line": 7, "column": 36 } } }, "range": [ 268, 296 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 36 } } }, "range": [ 268, 297 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 37 } } } ], "range": [ 258, 303 ], "loc": { "start": { "line": 6, "column": 50 }, "end": { "line": 8, "column": 5 } } }, "range": [ 212, 303 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 8, "column": 5 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "project", "range": [ 312, 319 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 15 } } }, "init": null, "range": [ 312, 319 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 15 } } } ], "kind": "var", "range": [ 308, 320 ], "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 16 } } }, { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "UnaryExpression", "operator": "typeof", "argument": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "args", "range": [ 336, 340 ], "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 10, "column": 19 } } }, "property": { "type": "BinaryExpression", "operator": "-", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "args", "range": [ 341, 345 ], "loc": { "start": { "line": 10, "column": 20 }, "end": { "line": 10, "column": 24 } } }, "property": { "type": "Identifier", "name": "length", "range": [ 346, 352 ], "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 31 } } }, "range": [ 341, 352 ], "loc": { "start": { "line": 10, "column": 20 }, "end": { "line": 10, "column": 31 } } }, "right": { "type": "Literal", "value": 1, "raw": "1", "range": [ 355, 356 ], "loc": { "start": { "line": 10, "column": 34 }, "end": { "line": 10, "column": 35 } } }, "range": [ 341, 356 ], "loc": { "start": { "line": 10, "column": 20 }, "end": { "line": 10, "column": 35 } } }, "range": [ 336, 357 ], "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 10, "column": 36 } } }, "prefix": true, "range": [ 329, 357 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 36 } } }, "right": { "type": "Literal", "value": "function", "raw": "'function'", "range": [ 362, 372 ], "loc": { "start": { "line": 10, "column": 41 }, "end": { "line": 10, "column": 51 } } }, "range": [ 329, 372 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 51 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "project", "range": [ 384, 391 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 15 } } }, "right": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "args", "range": [ 394, 398 ], "loc": { "start": { "line": 11, "column": 18 }, "end": { "line": 11, "column": 22 } } }, "property": { "type": "Identifier", "name": "pop", "range": [ 399, 402 ], "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 26 } } }, "range": [ 394, 402 ], "loc": { "start": { "line": 11, "column": 18 }, "end": { "line": 11, "column": 26 } } }, "arguments": [], "range": [ 394, 404 ], "loc": { "start": { "line": 11, "column": 18 }, "end": { "line": 11, "column": 28 } } }, "range": [ 384, 404 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 28 } } }, "range": [ 384, 405 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 29 } } } ], "range": [ 374, 411 ], "loc": { "start": { "line": 10, "column": 53 }, "end": { "line": 12, "column": 5 } } }, "alternate": null, "range": [ 325, 411 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 12, "column": 5 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "observables", "range": [ 420, 431 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 19 } } }, "init": { "type": "Identifier", "name": "args", "range": [ 434, 438 ], "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 26 } } }, "range": [ 420, 438 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 26 } } } ], "kind": "var", "range": [ 416, 439 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 27 } } }, { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 451, 455 ], "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 456, 460 ], "loc": { "start": { "line": 14, "column": 16 }, "end": { "line": 14, "column": 20 } } }, "range": [ 451, 460 ], "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 20 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "WithLatestFromOperator", "range": [ 465, 487 ], "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 47 } } }, "arguments": [ { "type": "Identifier", "name": "observables", "range": [ 488, 499 ], "loc": { "start": { "line": 14, "column": 48 }, "end": { "line": 14, "column": 59 } } }, { "type": "Identifier", "name": "project", "range": [ 501, 508 ], "loc": { "start": { "line": 14, "column": 61 }, "end": { "line": 14, "column": 68 } } } ], "range": [ 461, 509 ], "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 69 } } } ], "range": [ 451, 510 ], "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 70 } } }, "range": [ 444, 511 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 71 } } } ], "range": [ 187, 513 ], "loc": { "start": { "line": 4, "column": 33 }, "end": { "line": 15, "column": 1 } } }, "generator": false, "expression": false, "range": [ 161, 513 ], "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 15, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 117, 153 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } } } ], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 154, 513 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 15, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 117, 153 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "WithLatestFromOperator", "range": [ 518, 540 ], "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 26 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "WithLatestFromOperator", "range": [ 571, 593 ], "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 35 } } }, "params": [ { "type": "Identifier", "name": "observables", "range": [ 594, 605 ], "loc": { "start": { "line": 17, "column": 36 }, "end": { "line": 17, "column": 47 } } }, { "type": "Identifier", "name": "project", "range": [ 607, 614 ], "loc": { "start": { "line": 17, "column": 49 }, "end": { "line": 17, "column": 56 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 626, 630 ], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 12 } } }, "property": { "type": "Identifier", "name": "observables", "range": [ 631, 642 ], "loc": { "start": { "line": 18, "column": 13 }, "end": { "line": 18, "column": 24 } } }, "range": [ 626, 642 ], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 24 } } }, "right": { "type": "Identifier", "name": "observables", "range": [ 645, 656 ], "loc": { "start": { "line": 18, "column": 27 }, "end": { "line": 18, "column": 38 } } }, "range": [ 626, 656 ], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 38 } } }, "range": [ 626, 657 ], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 39 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 666, 670 ], "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 12 } } }, "property": { "type": "Identifier", "name": "project", "range": [ 671, 678 ], "loc": { "start": { "line": 19, "column": 13 }, "end": {