UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,476 lines 212 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": "Notification", "range": [ 53, 65 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 21 } } }, "imported": { "type": "Identifier", "name": "Notification", "range": [ 53, 65 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 21 } } }, "range": [ 53, 65 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 21 } } } ], "source": { "type": "Literal", "value": "../Notification", "raw": "'../Notification'", "range": [ 73, 90 ], "loc": { "start": { "line": 2, "column": 29 }, "end": { "line": 2, "column": 46 } } }, "range": [ 44, 91 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 47 } }, "trailingComments": [ { "type": "Block", "value": "*\n * @see {@link Notification}\n *\n * @param scheduler\n * @param delay\n * @return {Observable<R>|WebSocketSubject<T>|Observable<T>}\n * @method observeOn\n * @owner Observable\n ", "range": [ 92, 270 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 11, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "observeOn", "range": [ 287, 296 ], "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 25 } } }, "params": [ { "type": "Identifier", "name": "scheduler", "range": [ 297, 306 ], "loc": { "start": { "line": 12, "column": 26 }, "end": { "line": 12, "column": 35 } } }, { "type": "Identifier", "name": "delay", "range": [ 308, 313 ], "loc": { "start": { "line": 12, "column": 37 }, "end": { "line": 12, "column": 42 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "delay", "range": [ 325, 330 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 13 } } }, "right": { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Literal", "value": 0, "raw": "0", "range": [ 340, 341 ], "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 24 } } }, "prefix": true, "range": [ 335, 341 ], "loc": { "start": { "line": 13, "column": 18 }, "end": { "line": 13, "column": 24 } } }, "range": [ 325, 341 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 24 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "delay", "range": [ 345, 350 ], "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 33 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 353, 354 ], "loc": { "start": { "line": 13, "column": 36 }, "end": { "line": 13, "column": 37 } } }, "range": [ 345, 354 ], "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 37 } } }, "range": [ 345, 355 ], "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 38 } } } ], "range": [ 343, 357 ], "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 40 } } }, "alternate": null, "range": [ 321, 357 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 40 } } }, { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 369, 373 ], "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 374, 378 ], "loc": { "start": { "line": 14, "column": 16 }, "end": { "line": 14, "column": 20 } } }, "range": [ 369, 378 ], "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 20 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "ObserveOnOperator", "range": [ 383, 400 ], "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 42 } } }, "arguments": [ { "type": "Identifier", "name": "scheduler", "range": [ 401, 410 ], "loc": { "start": { "line": 14, "column": 43 }, "end": { "line": 14, "column": 52 } } }, { "type": "Identifier", "name": "delay", "range": [ 412, 417 ], "loc": { "start": { "line": 14, "column": 54 }, "end": { "line": 14, "column": 59 } } } ], "range": [ 379, 418 ], "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 60 } } } ], "range": [ 369, 419 ], "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 61 } } }, "range": [ 362, 420 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 62 } } } ], "range": [ 315, 422 ], "loc": { "start": { "line": 12, "column": 44 }, "end": { "line": 15, "column": 1 } } }, "generator": false, "expression": false, "range": [ 278, 422 ], "loc": { "start": { "line": 12, "column": 7 }, "end": { "line": 15, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": "*\n * @see {@link Notification}\n *\n * @param scheduler\n * @param delay\n * @return {Observable<R>|WebSocketSubject<T>|Observable<T>}\n * @method observeOn\n * @owner Observable\n ", "range": [ 92, 270 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 11, "column": 3 } } } ], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 271, 422 ], "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 15, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": "*\n * @see {@link Notification}\n *\n * @param scheduler\n * @param delay\n * @return {Observable<R>|WebSocketSubject<T>|Observable<T>}\n * @method observeOn\n * @owner Observable\n ", "range": [ 92, 270 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 11, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "ObserveOnOperator", "range": [ 434, 451 ], "loc": { "start": { "line": 16, "column": 11 }, "end": { "line": 16, "column": 28 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "ObserveOnOperator", "range": [ 482, 499 ], "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 30 } } }, "params": [ { "type": "Identifier", "name": "scheduler", "range": [ 500, 509 ], "loc": { "start": { "line": 17, "column": 31 }, "end": { "line": 17, "column": 40 } } }, { "type": "Identifier", "name": "delay", "range": [ 511, 516 ], "loc": { "start": { "line": 17, "column": 42 }, "end": { "line": 17, "column": 47 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "delay", "range": [ 532, 537 ], "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 17 } } }, "right": { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Literal", "value": 0, "raw": "0", "range": [ 547, 548 ], "loc": { "start": { "line": 18, "column": 27 }, "end": { "line": 18, "column": 28 } } }, "prefix": true, "range": [ 542, 548 ], "loc": { "start": { "line": 18, "column": 22 }, "end": { "line": 18, "column": 28 } } }, "range": [ 532, 548 ], "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 28 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "delay", "range": [ 552, 557 ], "loc": { "start": { "line": 18, "column": 32 }, "end": { "line": 18, "column": 37 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 560, 561 ], "loc": { "start": { "line": 18, "column": 40 }, "end": { "line": 18, "column": 41 } } }, "range": [ 552, 561 ], "loc": { "start": { "line": 18, "column": 32 }, "end": { "line": 18, "column": 41 } } }, "range": [ 552, 562 ], "loc": { "start": { "line": 18, "column": 32 }, "end": { "line": 18, "column": 42 } } } ], "range": [ 550, 564 ], "loc": { "start": { "line": 18, "column": 30 }, "end": { "line": 18, "column": 44 } } }, "alternate": null, "range": [ 528, 564 ], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 44 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 573, 577 ], "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 12 } } }, "property": { "type": "Identifier", "name": "scheduler", "range": [ 578, 587 ], "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 22 } } }, "range": [ 573, 587 ], "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 22 } } }, "right": { "type": "Identifier", "name": "scheduler", "range": [ 590, 599 ], "loc": { "start": { "line": 19, "column": 25 }, "end": { "line": 19, "column": 34 } } }, "range": [ 573, 599 ], "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 34 } } }, "range": [ 573, 600 ], "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 35 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 609, 613 ], "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 12 } } }, "property": { "type": "Identifier", "name": "delay", "range": [ 614, 619 ], "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 18 } } }, "range": [ 609, 619 ], "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 18 } } }, "right": { "type": "Identifier", "name": "delay", "range": [ 622, 627 ], "loc": { "start": { "line": 20, "column": 21 }, "end": { "line": 20, "column": 26 } } }, "range": [ 609, 627 ], "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 26 } } }, "range": [ 609, 628 ], "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 27 } } } ], "range": [ 518, 634 ], "loc": { "start": { "line": 17, "column": 49 }, "end": { "line": 21, "column": 5 } } }, "generator": false, "expression": false, "range": [ 473, 634 ], "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 21, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "ObserveOnOperator", "range": [ 639, 656 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 21 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 657, 666 ], "loc": { "start": { "line": 22, "column": 22 }, "end": { "line": 22, "column": 31 } } }, "range": [ 639, 666 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 31 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 667, 671 ], "loc": { "start": { "line": 22, "column": 32 }, "end": { "line": 22, "column": 36 } } }, "range": [ 639, 671 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 36 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "subscriber", "range": [ 684, 694 ], "loc": { "start": { "line": 22, "column": 49 }, "end": { "line": 22, "column": 59 } } }, { "type": "Identifier", "name": "source", "range": [ 696, 702 ], "loc": { "start": { "line": 22, "column": 61 }, "end": { "line": 22, "column": 67 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 721, 727 ], "loc": { "start": { "line": 23, "column": 15 }, "end": { "line": 23, "column": 21 } } }, "property": { "type": "Identifier", "name": "_subscribe", "range": [ 728, 738 ], "loc": { "start": { "line": 23, "column": 22 }, "end": { "line": 23, "column": 32 } } }, "range": [ 721, 738 ], "loc": { "start": { "line": 23, "column": 15 }, "end": { "line": 23, "column": 32 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "ObserveOnSubscriber", "range": [ 743, 762 ], "loc": { "start": { "line": 23, "column": 37 }, "end": { "line": 23, "column": 56 } } }, "arguments": [ { "type": "Identifier", "name": "subscriber", "range": [ 763, 773 ], "loc": { "start": { "line": 23, "column": 57 }, "end": { "line": 23, "column": 67 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 775, 779 ], "loc": { "start": { "line":