UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,723 lines (1,722 loc) 350 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "async", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, "imported": { "type": "Identifier", "name": "async", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } } ], "source": { "type": "Literal", "value": "../scheduler/async", "raw": "'../scheduler/async'", "range": [ 22, 42 ], "loc": { "start": { "line": 1, "column": 22 }, "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": "isDate", "range": [ 53, 59 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 15 } } }, "imported": { "type": "Identifier", "name": "isDate", "range": [ 53, 59 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 15 } } }, "range": [ 53, 59 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 15 } } } ], "source": { "type": "Literal", "value": "../util/isDate", "raw": "'../util/isDate'", "range": [ 67, 83 ], "loc": { "start": { "line": 2, "column": 23 }, "end": { "line": 2, "column": 39 } } }, "range": [ 44, 84 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 40 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 94, 109 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } }, "imported": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 94, 109 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } }, "range": [ 94, 109 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } } ], "source": { "type": "Literal", "value": "../OuterSubscriber", "raw": "'../OuterSubscriber'", "range": [ 117, 137 ], "loc": { "start": { "line": 3, "column": 32 }, "end": { "line": 3, "column": 52 } } }, "range": [ 85, 138 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 53 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "subscribeToResult", "range": [ 148, 165 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 26 } } }, "imported": { "type": "Identifier", "name": "subscribeToResult", "range": [ 148, 165 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 26 } } }, "range": [ 148, 165 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 26 } } } ], "source": { "type": "Literal", "value": "../util/subscribeToResult", "raw": "'../util/subscribeToResult'", "range": [ 173, 200 ], "loc": { "start": { "line": 4, "column": 34 }, "end": { "line": 4, "column": 61 } } }, "range": [ 139, 201 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 62 } }, "trailingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 202, 238 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 36 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "timeoutWith", "range": [ 255, 266 ], "loc": { "start": { "line": 6, "column": 16 }, "end": { "line": 6, "column": 27 } } }, "params": [ { "type": "Identifier", "name": "due", "range": [ 267, 270 ], "loc": { "start": { "line": 6, "column": 28 }, "end": { "line": 6, "column": 31 } } }, { "type": "Identifier", "name": "withObservable", "range": [ 272, 286 ], "loc": { "start": { "line": 6, "column": 33 }, "end": { "line": 6, "column": 47 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 288, 297 ], "loc": { "start": { "line": 6, "column": 49 }, "end": { "line": 6, "column": 58 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "scheduler", "range": [ 309, 318 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 17 } } }, "right": { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Literal", "value": 0, "raw": "0", "range": [ 328, 329 ], "loc": { "start": { "line": 7, "column": 27 }, "end": { "line": 7, "column": 28 } } }, "prefix": true, "range": [ 323, 329 ], "loc": { "start": { "line": 7, "column": 22 }, "end": { "line": 7, "column": 28 } } }, "range": [ 309, 329 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 28 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "scheduler", "range": [ 333, 342 ], "loc": { "start": { "line": 7, "column": 32 }, "end": { "line": 7, "column": 41 } } }, "right": { "type": "Identifier", "name": "async", "range": [ 345, 350 ], "loc": { "start": { "line": 7, "column": 44 }, "end": { "line": 7, "column": 49 } } }, "range": [ 333, 350 ], "loc": { "start": { "line": 7, "column": 32 }, "end": { "line": 7, "column": 49 } } }, "range": [ 333, 351 ], "loc": { "start": { "line": 7, "column": 32 }, "end": { "line": 7, "column": 50 } } } ], "range": [ 331, 353 ], "loc": { "start": { "line": 7, "column": 30 }, "end": { "line": 7, "column": 52 } } }, "alternate": null, "range": [ 305, 353 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 52 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "absoluteTimeout", "range": [ 362, 377 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 23 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "isDate", "range": [ 380, 386 ], "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 32 } } }, "arguments": [ { "type": "Identifier", "name": "due", "range": [ 387, 390 ], "loc": { "start": { "line": 8, "column": 33 }, "end": { "line": 8, "column": 36 } } } ], "range": [ 380, 391 ], "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 37 } } }, "range": [ 362, 391 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 37 } } } ], "kind": "var", "range": [ 358, 392 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "waitFor", "range": [ 401, 408 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 15 } } }, "init": { "type": "ConditionalExpression", "test": { "type": "Identifier", "name": "absoluteTimeout", "range": [ 411, 426 ], "loc": { "start": { "line": 9, "column": 18 }, "end": { "line": 9, "column": 33 } } }, "consequent": { "type": "BinaryExpression", "operator": "-", "left": { "type": "UnaryExpression", "operator": "+", "argument": { "type": "Identifier", "name": "due", "range": [ 431, 434 ], "loc": { "start": { "line": 9, "column": 38 }, "end": { "line": 9, "column": 41 } } }, "prefix": true, "range": [ 430, 434 ], "loc": { "start": { "line": 9, "column": 37 }, "end": { "line": 9, "column": 41 } } }, "right": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "scheduler", "range": [ 437, 446 ], "loc": { "start": { "line": 9, "column": 44 }, "end": { "line": 9, "column": 53 } } }, "property": { "type": "Identifier", "name": "now", "range": [ 447, 450 ], "loc": { "start": { "line": 9, "column": 54 }, "end": { "line": 9, "column": 57 } } }, "range": [ 437, 450 ], "loc": { "start": { "line": 9, "column": 44 }, "end": { "line": 9, "column": 57 } } }, "arguments": [], "range": [ 437, 452 ], "loc": { "start": { "line": 9, "column": 44 }, "end": { "line": 9, "column": 59 } } }, "range": [ 430, 452 ], "loc": { "start": { "line": 9, "column": 37 }, "end": { "line": 9, "column": 59 } } }, "alternate": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Math", "range": [ 456, 460 ], "loc": { "start": { "line": 9, "column": 63 }, "end": { "line": 9, "column": 67 } } }, "property": { "type": "Identifier", "name": "abs", "range": [ 461, 464 ], "loc": { "start": { "line": 9, "column": 68 }, "end": { "line": 9, "column": 71 } } }, "range": [ 456, 464 ], "loc": { "start": { "line": 9, "column": 63 }, "end": { "line": 9, "column": 71 } } }, "arguments": [ { "type": "Identifier", "name": "due", "range": [ 465, 468 ], "loc": { "start": { "line": 9, "column": 72 }, "end": { "line": 9, "column": 75 } } } ], "range": [ 456, 469 ], "loc": { "start": { "line": 9, "column": 63 }, "end": { "line": 9, "column": 76 } } }, "range": [ 411, 469 ], "loc": { "start": { "line": 9, "column": 18 }, "end": { "line": 9, "column": 76 } } }, "range": [ 401, 469 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 76 } } } ], "kind": "var", "range": [ 397, 470 ], "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 77 } } }, { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 482, 486 ], "loc": { "start": { "line": 10, "column": 11 }, "end": { "line": 10, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 487, 491 ], "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 20 } } }, "range": [ 482, 491 ], "loc": { "start": { "line": 10, "column": 11 }, "end": { "line": 10, "column": 20 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "TimeoutWithOperator", "range": [ 496, 515 ], "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 44 } } }, "arguments": [ { "type": "Identifier", "name": "waitFor", "range": [ 516, 523 ], "loc": { "start": { "line": 10, "column": 45 }, "end": { "line": 10, "column": 52 } } }, { "type": "Identifier", "name": "absoluteTimeout", "range": [ 525, 540 ], "loc": { "start": { "line": 10, "column": 54 }, "end": { "line": 10, "column": 69 } } }, { "type": "Identifier", "name": "withObservable", "range": [ 542, 556 ], "loc": { "start": { "line": 10, "column": 71 }, "end": { "line": 10, "column": 85 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 558, 567 ], "loc": { "start": { "line": 10, "column": 87 }, "end": { "line": 10, "column": 96 } } } ], "range": [ 492, 568 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 97 } } } ], "range": [ 482, 569 ], "loc": { "start": { "line": 10, "column": 11 }, "end": { "line": 10, "column": 98 } } }, "range": [ 475, 570 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 99 } } } ], "range": [ 299, 572 ], "loc": { "start": { "line": 6, "column": 60 }, "end": { "line": 11, "column": 1 } } }, "generator": false, "expression": false, "range": [ 246, 572 ], "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 11, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 202, 238 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 36 } } } ], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 239, 572 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 11, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 202, 238 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 36 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "TimeoutWithOperator", "range": [ 577, 596 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 23 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "TimeoutWithOperator", "range": [ 627, 646 ], "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 32 } } }, "params": [ { "type": "Identifier", "name": "waitFor", "range": [ 647, 654 ], "loc": { "start": { "line": 13, "column": 33 }, "end": { "line": 13, "column": 40 } } }, { "type": "Identifier", "name": "absoluteTimeout", "range": [ 656, 671 ], "loc": { "start": { "line": 13, "column": 42 }, "end": { "line": 13, "column": 57 } } }, { "type": "Identifier", "name": "withObservable", "range": [ 673, 687 ], "loc": { "start": { "line": 13, "column": 59 }, "end": { "line": 13, "column": 73 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 689, 698 ], "loc": { "start": { "line": 13, "column": 75 }, "end": { "line": 13, "column": 84 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 710, 714 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 12 } } }, "property": { "type": "Identifier", "name": "waitFor", "range": [ 715, 722 ], "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 20 } } }, "range": [ 710, 722 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 20 } } }, "right": { "type": "Identifier", "name": "waitFor", "range": [ 725, 732 ], "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 30 } } }, "range": [ 710, 732 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 30 } } }, "range": [ 710, 733 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 31 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 742, 746 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 12 } } }, "property": { "type": "Identifier", "name": "absoluteTimeout", "range": [ 747, 762 ], "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 28 } } }, "range": [ 742, 762 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 28 } } }, "right": { "type": "Identifier", "name": "absoluteTimeout", "range": [ 765, 780 ], "loc": { "start": { "line": 15, "column": 31 }, "end": { "line": 15, "column": 46 } } }, "range": [ 742, 780 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 46 } } }, "range": [ 742, 781 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 47 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 790, 794 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } }