UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,593 lines (1,592 loc) 129 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Subscriber", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, "imported": { "type": "Identifier", "name": "Subscriber", "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": "../Subscriber", "raw": "'../Subscriber'", "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": "async", "range": [ 53, 58 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 14 } } }, "imported": { "type": "Identifier", "name": "async", "range": [ 53, 58 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 14 } } }, "range": [ 53, 58 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 14 } } } ], "source": { "type": "Literal", "value": "../scheduler/async", "raw": "'../scheduler/async'", "range": [ 66, 86 ], "loc": { "start": { "line": 2, "column": 22 }, "end": { "line": 2, "column": 42 } } }, "range": [ 44, 87 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 43 } }, "trailingComments": [ { "type": "Block", "value": "*\n * @param scheduler\n * @return {Observable<TimeInterval<any>>|WebSocketSubject<T>|Observable<T>}\n * @method timeInterval\n * @owner Observable\n ", "range": [ 88, 237 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "timeInterval", "range": [ 254, 266 ], "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 28 } } }, "params": [ { "type": "Identifier", "name": "scheduler", "range": [ 267, 276 ], "loc": { "start": { "line": 9, "column": 29 }, "end": { "line": 9, "column": 38 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "scheduler", "range": [ 288, 297 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 17 } } }, "right": { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Literal", "value": 0, "raw": "0", "range": [ 307, 308 ], "loc": { "start": { "line": 10, "column": 27 }, "end": { "line": 10, "column": 28 } } }, "prefix": true, "range": [ 302, 308 ], "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 28 } } }, "range": [ 288, 308 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 28 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "scheduler", "range": [ 312, 321 ], "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 41 } } }, "right": { "type": "Identifier", "name": "async", "range": [ 324, 329 ], "loc": { "start": { "line": 10, "column": 44 }, "end": { "line": 10, "column": 49 } } }, "range": [ 312, 329 ], "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 49 } } }, "range": [ 312, 330 ], "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 50 } } } ], "range": [ 310, 332 ], "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 52 } } }, "alternate": null, "range": [ 284, 332 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 52 } } }, { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 344, 348 ], "loc": { "start": { "line": 11, "column": 11 }, "end": { "line": 11, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 349, 353 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 20 } } }, "range": [ 344, 353 ], "loc": { "start": { "line": 11, "column": 11 }, "end": { "line": 11, "column": 20 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "TimeIntervalOperator", "range": [ 358, 378 ], "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 45 } } }, "arguments": [ { "type": "Identifier", "name": "scheduler", "range": [ 379, 388 ], "loc": { "start": { "line": 11, "column": 46 }, "end": { "line": 11, "column": 55 } } } ], "range": [ 354, 389 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 56 } } } ], "range": [ 344, 390 ], "loc": { "start": { "line": 11, "column": 11 }, "end": { "line": 11, "column": 57 } } }, "range": [ 337, 391 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 58 } } } ], "range": [ 278, 393 ], "loc": { "start": { "line": 9, "column": 40 }, "end": { "line": 12, "column": 1 } } }, "generator": false, "expression": false, "range": [ 245, 393 ], "loc": { "start": { "line": 9, "column": 7 }, "end": { "line": 12, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": "*\n * @param scheduler\n * @return {Observable<TimeInterval<any>>|WebSocketSubject<T>|Observable<T>}\n * @method timeInterval\n * @owner Observable\n ", "range": [ 88, 237 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "column": 3 } } } ], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 238, 393 ], "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 12, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": "*\n * @param scheduler\n * @return {Observable<TimeInterval<any>>|WebSocketSubject<T>|Observable<T>}\n * @method timeInterval\n * @owner Observable\n ", "range": [ 88, 237 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "TimeInterval", "range": [ 405, 417 ], "loc": { "start": { "line": 13, "column": 11 }, "end": { "line": 13, "column": 23 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "TimeInterval", "range": [ 448, 460 ], "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 25 } } }, "params": [ { "type": "Identifier", "name": "value", "range": [ 461, 466 ], "loc": { "start": { "line": 14, "column": 26 }, "end": { "line": 14, "column": 31 } } }, { "type": "Identifier", "name": "interval", "range": [ 468, 476 ], "loc": { "start": { "line": 14, "column": 33 }, "end": { "line": 14, "column": 41 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 488, 492 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 12 } } }, "property": { "type": "Identifier", "name": "value", "range": [ 493, 498 ], "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 18 } } }, "range": [ 488, 498 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 18 } } }, "right": { "type": "Identifier", "name": "value", "range": [ 501, 506 ], "loc": { "start": { "line": 15, "column": 21 }, "end": { "line": 15, "column": 26 } } }, "range": [ 488, 506 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 26 } } }, "range": [ 488, 507 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 27 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 516, 520 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "name": "interval", "range": [ 521, 529 ], "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 21 } } }, "range": [ 516, 529 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 21 } } }, "right": { "type": "Identifier", "name": "interval", "range": [ 532, 540 ], "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 32 } } }, "range": [ 516, 540 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 32 } } }, "range": [ 516, 541 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 33 } } } ], "range": [ 478, 547 ], "loc": { "start": { "line": 14, "column": 43 }, "end": { "line": 17, "column": 5 } } }, "generator": false, "expression": false, "range": [ 439, 547 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 17, "column": 5 } } }, { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "TimeInterval", "range": [ 559, 571 ], "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 23 } } }, "range": [ 552, 572 ], "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 24 } } } ], "range": [ 433, 574 ], "loc": { "start": { "line": 13, "column": 39 }, "end": { "line": 19, "column": 1 } } }, "generator": false, "expression": false, "range": [ 421, 574 ], "loc": { "start": { "line": 13, "column": 27 }, "end": { "line": 19, "column": 1 } } }, "arguments": [], "range": [ 421, 576 ], "loc": { "start": { "line": 13, "column": 27 }, "end": { "line": 19, "column": 3 } } }, "range": [ 405, 577 ], "loc": { "start": { "line": 13, "column": 11 }, "end": { "line": 19, "column": 4 } } } ], "kind": "var", "range": [ 401, 578 ], "loc": { "start": { "line": 13, "column": 7 }, "end": { "line": 19, "column": 5 } }, "leadingComments": [], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 394, 578 ], "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 19, "column": 5 } } }, { "type": "EmptyStatement", "range": [ 579, 580 ], "loc": { "start": { "line": 20, "column": 0 }, "end": { "line": 20, "column": 1 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "TimeIntervalOperator", "range": [ 585, 605 ], "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 24 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "TimeIntervalOperator", "range": [ 636, 656 ], "loc": { "start": { "line": 22, "column": 13 }, "end": { "line": 22, "column": 33 } } }, "params": [ { "type": "Identifier", "name": "scheduler", "range": [ 657, 666 ], "loc": { "start": { "line": 22, "column": 34 }, "end": { "line": 22, "column": 43 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 678, 682 ], "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 12 } } }, "property": { "type": "Identifier", "name": "scheduler", "range": [ 683, 692 ], "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 22 } } }, "range": [ 678, 692 ], "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 22 } } }, "right": { "type": "Identifier", "name": "scheduler", "range": [ 695, 704 ], "loc": { "start": { "line": 23, "column": 25 }, "end": { "line": 23, "column": 34 } } }, "range": [ 678, 704 ], "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 34 } } }, "range": [ 678, 705 ], "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 35 } } } ], "range": [ 668, 711 ], "loc": { "start": { "line": 22, "column": 45 }, "end": { "line": 24, "column": 5 } } }, "generator": false, "expression": false, "range": [ 627, 711 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 24, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "TimeIntervalOperator", "range": [ 716, 736 ], "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 24 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 737, 746 ], "loc": { "start": { "line": 25, "column": 25 }, "end": { "line": 25, "column": 34 } } }, "range": [ 716, 746 ], "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 34 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 747, 751 ], "loc": { "start": { "line": 25, "column": 35 }, "end": { "line": 25, "column": 39 } } }, "range": [ 716, 751 ], "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 39 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "observer", "range": [ 764, 772 ], "loc": { "start": { "line": 25, "column": 52 }, "end": { "line": 25, "column": 60 } } }, { "type": "Identifier", "name": "source", "range": [ 774, 780 ], "loc": { "start": { "line": 25, "column": 62 }, "end": { "line": 25, "column": 68 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 799, 805 ], "loc": { "start": { "line": 26, "column": 15 }, "end": { "line": 26, "column": 21 } } }, "property": { "type": "Identifier", "name": "_subscribe", "range": [ 806, 816 ], "loc": { "start": { "line": 26, "column": 22 }, "end": { "line": 26, "column": 32 } } }, "range": [ 799, 816 ], "loc": { "start": { "line": 26, "column": 15 }, "end": { "line": 26, "column": 32 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "TimeIntervalSubscriber", "range": [ 821, 843 ], "loc": { "start": { "line": 26, "column": 37 }, "end": { "line": 26, "column": 59 } } }, "arguments": [