UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,434 lines (1,433 loc) 230 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "isNumeric", "range": [ 9, 18 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } } }, "imported": { "type": "Identifier", "name": "isNumeric", "range": [ 9, 18 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } } }, "range": [ 9, 18 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } } } ], "source": { "type": "Literal", "value": "../util/isNumeric", "raw": "'../util/isNumeric'", "range": [ 26, 45 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 45 } } }, "range": [ 0, 46 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 46 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Observable", "range": [ 56, 66 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } }, "imported": { "type": "Identifier", "name": "Observable", "range": [ 56, 66 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } }, "range": [ 56, 66 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } } ], "source": { "type": "Literal", "value": "../Observable", "raw": "'../Observable'", "range": [ 74, 89 ], "loc": { "start": { "line": 2, "column": 27 }, "end": { "line": 2, "column": 42 } } }, "range": [ 47, 90 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 43 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "async", "range": [ 100, 105 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 14 } } }, "imported": { "type": "Identifier", "name": "async", "range": [ 100, 105 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 14 } } }, "range": [ 100, 105 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 14 } } } ], "source": { "type": "Literal", "value": "../scheduler/async", "raw": "'../scheduler/async'", "range": [ 113, 133 ], "loc": { "start": { "line": 3, "column": 22 }, "end": { "line": 3, "column": 42 } } }, "range": [ 91, 134 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 43 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "isScheduler", "range": [ 144, 155 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 20 } } }, "imported": { "type": "Identifier", "name": "isScheduler", "range": [ 144, 155 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 20 } } }, "range": [ 144, 155 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 20 } } } ], "source": { "type": "Literal", "value": "../util/isScheduler", "raw": "'../util/isScheduler'", "range": [ 163, 184 ], "loc": { "start": { "line": 4, "column": 28 }, "end": { "line": 4, "column": 49 } } }, "range": [ 135, 185 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 50 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "isDate", "range": [ 195, 201 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 15 } } }, "imported": { "type": "Identifier", "name": "isDate", "range": [ 195, 201 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 15 } } }, "range": [ 195, 201 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 15 } } } ], "source": { "type": "Literal", "value": "../util/isDate", "raw": "'../util/isDate'", "range": [ 209, 225 ], "loc": { "start": { "line": 5, "column": 23 }, "end": { "line": 5, "column": 39 } } }, "range": [ 186, 226 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 40 } }, "trailingComments": [ { "type": "Block", "value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n ", "range": [ 227, 321 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 10, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "TimerObservable", "range": [ 333, 348 ], "loc": { "start": { "line": 11, "column": 11 }, "end": { "line": 11, "column": 26 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "_super", "range": [ 362, 368 ], "loc": { "start": { "line": 11, "column": 40 }, "end": { "line": 11, "column": 46 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "__extends", "range": [ 376, 385 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 13 } } }, "arguments": [ { "type": "Identifier", "name": "TimerObservable", "range": [ 386, 401 ], "loc": { "start": { "line": 12, "column": 14 }, "end": { "line": 12, "column": 29 } } }, { "type": "Identifier", "name": "_super", "range": [ 403, 409 ], "loc": { "start": { "line": 12, "column": 31 }, "end": { "line": 12, "column": 37 } } } ], "range": [ 376, 410 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 38 } } }, "range": [ 376, 411 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 39 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "TimerObservable", "range": [ 425, 440 ], "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 28 } } }, "params": [ { "type": "Identifier", "name": "dueTime", "range": [ 441, 448 ], "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 36 } } }, { "type": "Identifier", "name": "period", "range": [ 450, 456 ], "loc": { "start": { "line": 13, "column": 38 }, "end": { "line": 13, "column": 44 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 458, 467 ], "loc": { "start": { "line": 13, "column": 46 }, "end": { "line": 13, "column": 55 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "dueTime", "range": [ 483, 490 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 19 } } }, "right": { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Literal", "value": 0, "raw": "0", "range": [ 500, 501 ], "loc": { "start": { "line": 14, "column": 29 }, "end": { "line": 14, "column": 30 } } }, "prefix": true, "range": [ 495, 501 ], "loc": { "start": { "line": 14, "column": 24 }, "end": { "line": 14, "column": 30 } } }, "range": [ 483, 501 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 30 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "dueTime", "range": [ 505, 512 ], "loc": { "start": { "line": 14, "column": 34 }, "end": { "line": 14, "column": 41 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 515, 516 ], "loc": { "start": { "line": 14, "column": 44 }, "end": { "line": 14, "column": 45 } } }, "range": [ 505, 516 ], "loc": { "start": { "line": 14, "column": 34 }, "end": { "line": 14, "column": 45 } } }, "range": [ 505, 517 ], "loc": { "start": { "line": 14, "column": 34 }, "end": { "line": 14, "column": 46 } } } ], "range": [ 503, 519 ], "loc": { "start": { "line": 14, "column": 32 }, "end": { "line": 14, "column": 48 } } }, "alternate": null, "range": [ 479, 519 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 48 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "_super", "range": [ 528, 534 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 14 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 535, 539 ], "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 15, "column": 19 } } }, "range": [ 528, 539 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 19 } } }, "arguments": [ { "type": "ThisExpression", "range": [ 540, 544 ], "loc": { "start": { "line": 15, "column": 20 }, "end": { "line": 15, "column": 24 } } } ], "range": [ 528, 545 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 25 } } }, "range": [ 528, 546 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 26 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 555, 559 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "name": "period", "range": [ 560, 566 ], "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 19 } } }, "range": [ 555, 566 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 19 } } }, "right": { "type": "UnaryExpression", "operator": "-", "argument": { "type": "Literal", "value": 1, "raw": "1", "range": [ 570, 571 ], "loc": { "start": { "line": 16, "column": 23 }, "end": { "line": 16, "column": 24 } } }, "prefix": true, "range": [ 569, 571 ], "loc": { "start": { "line": 16, "column": 22 }, "end": { "line": 16, "column": 24 } } }, "range": [ 555, 571 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 24 } } }, "range": [ 555, 572 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 25 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 581, 585 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 12 } } }, "property": { "type": "Identifier", "name": "dueTime", "range": [ 586, 593 ], "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 20 } } }, "range": [ 581, 593 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 20 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 596, 597 ], "loc": { "start": { "line": 17, "column": 23 }, "end": { "line": 17, "column": 24 } } }, "range": [ 581, 597 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 24 } } }, "range": [ 581, 598 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 25 } } }, { "type": "IfStatement", "test": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "isNumeric", "range": [ 611, 620 ], "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 21 } } }, "arguments": [ { "type": "Identifier", "name": "period", "range": [ 621, 627 ], "loc": { "start": { "line": 18, "column": 22 }, "end": { "line": 18, "column": 28 } } } ], "range": [ 611, 628 ], "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 29 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 644, 648 ], "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 16 } } }, "property": { "type": "Identifier", "name": "period", "range": [ 649, 655 ], "loc": { "start": { "line": 19, "column": 17 }, "end": { "line": 19, "column": 23 } } }, "range": [ 644, 655 ], "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 23 } } }, "right": { "type": "LogicalExpression", "operator": "||", "left": { "type": "LogicalExpression", "operator": "&&", "left": { "type": "BinaryExpression", "operator": "<", "left": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "Number", "range": [ 658, 664 ], "loc": { "start": { "line": 19, "column": 26 }, "end": { "line": 19, "column": 32 } } }, "arguments": [ { "type": "Identifier", "name": "period", "range": [ 665, 671 ], "loc": { "start": { "line": 19, "column": 33 }, "end": { "line": 19, "column": 39 } } } ], "range": [ 658, 672 ], "loc": { "start": { "line": 19, "column": 26 }, "end": { "line": 19, "column": 40 } } }, "right": { "type": "Literal", "value": 1, "raw": "1", "range": [ 675, 676 ], "loc": { "start": { "line": 19, "column": 43 }, "end": { "line": 19, "column": 44 } } }, "range": [ 658, 676 ], "loc": { "start": { "line": 19, "column": 26 },