UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,298 lines (1,297 loc) 157 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Observable", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, "imported": { "type": "Identifier", "name": "Observable", "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": "../Observable", "raw": "'../Observable'", "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 } }, "trailingComments": [ { "type": "Block", "value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n ", "range": [ 44, 138 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 6, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "ScalarObservable", "range": [ 150, 166 ], "loc": { "start": { "line": 7, "column": 11 }, "end": { "line": 7, "column": 27 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "_super", "range": [ 180, 186 ], "loc": { "start": { "line": 7, "column": 41 }, "end": { "line": 7, "column": 47 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "__extends", "range": [ 194, 203 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 13 } } }, "arguments": [ { "type": "Identifier", "name": "ScalarObservable", "range": [ 204, 220 ], "loc": { "start": { "line": 8, "column": 14 }, "end": { "line": 8, "column": 30 } } }, { "type": "Identifier", "name": "_super", "range": [ 222, 228 ], "loc": { "start": { "line": 8, "column": 32 }, "end": { "line": 8, "column": 38 } } } ], "range": [ 194, 229 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 39 } } }, "range": [ 194, 230 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 40 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "ScalarObservable", "range": [ 244, 260 ], "loc": { "start": { "line": 9, "column": 13 }, "end": { "line": 9, "column": 29 } } }, "params": [ { "type": "Identifier", "name": "value", "range": [ 261, 266 ], "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 35 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 268, 277 ], "loc": { "start": { "line": 9, "column": 37 }, "end": { "line": 9, "column": 46 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "_super", "range": [ 289, 295 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 14 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 296, 300 ], "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 10, "column": 19 } } }, "range": [ 289, 300 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 19 } } }, "arguments": [ { "type": "ThisExpression", "range": [ 301, 305 ], "loc": { "start": { "line": 10, "column": 20 }, "end": { "line": 10, "column": 24 } } } ], "range": [ 289, 306 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 25 } } }, "range": [ 289, 307 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 26 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 316, 320 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } } }, "property": { "type": "Identifier", "name": "value", "range": [ 321, 326 ], "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 18 } } }, "range": [ 316, 326 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 18 } } }, "right": { "type": "Identifier", "name": "value", "range": [ 329, 334 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 26 } } }, "range": [ 316, 334 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 26 } } }, "range": [ 316, 335 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 27 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 344, 348 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "name": "scheduler", "range": [ 349, 358 ], "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 22 } } }, "range": [ 344, 358 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 22 } } }, "right": { "type": "Identifier", "name": "scheduler", "range": [ 361, 370 ], "loc": { "start": { "line": 12, "column": 25 }, "end": { "line": 12, "column": 34 } } }, "range": [ 344, 370 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 34 } } }, "range": [ 344, 371 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 35 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 380, 384 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } }, "property": { "type": "Identifier", "name": "_isScalar", "range": [ 385, 394 ], "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 22 } } }, "range": [ 380, 394 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 22 } } }, "right": { "type": "Literal", "value": true, "raw": "true", "range": [ 397, 401 ], "loc": { "start": { "line": 13, "column": 25 }, "end": { "line": 13, "column": 29 } } }, "range": [ 380, 401 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 29 } } }, "range": [ 380, 402 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 30 } } }, { "type": "IfStatement", "test": { "type": "Identifier", "name": "scheduler", "range": [ 415, 424 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 21 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 440, 444 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 16 } } }, "property": { "type": "Identifier", "name": "_isScalar", "range": [ 445, 454 ], "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 26 } } }, "range": [ 440, 454 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 26 } } }, "right": { "type": "Literal", "value": false, "raw": "false", "range": [ 457, 462 ], "loc": { "start": { "line": 15, "column": 29 }, "end": { "line": 15, "column": 34 } } }, "range": [ 440, 462 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 34 } } }, "range": [ 440, 463 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 35 } } } ], "range": [ 426, 473 ], "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 16, "column": 9 } } }, "alternate": null, "range": [ 411, 473 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 16, "column": 9 } } } ], "range": [ 279, 479 ], "loc": { "start": { "line": 9, "column": 48 }, "end": { "line": 17, "column": 5 } } }, "generator": false, "expression": false, "range": [ 235, 479 ], "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 17, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "ScalarObservable", "range": [ 484, 500 ], "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 20 } } }, "property": { "type": "Identifier", "name": "create", "range": [ 501, 507 ], "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 27 } } }, "range": [ 484, 507 ], "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 27 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "value", "range": [ 520, 525 ], "loc": { "start": { "line": 18, "column": 40 }, "end": { "line": 18, "column": 45 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 527, 536 ], "loc": { "start": { "line": 18, "column": 47 }, "end": { "line": 18, "column": 56 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "ScalarObservable", "range": [ 559, 575 ], "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 35 } } }, "arguments": [ { "type": "Identifier", "name": "value", "range": [ 576, 581 ], "loc": { "start": { "line": 19, "column": 36 }, "end": { "line": 19, "column": 41 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 583, 592 ], "loc": { "start": { "line": 19, "column": 43 }, "end": { "line": 19, "column": 52 } } } ], "range": [ 555, 593 ], "loc": { "start": { "line": 19, "column": 15 }, "end": { "line": 19, "column": 53 } } }, "range": [ 548, 594 ], "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 54 } } } ], "range": [ 538, 600 ], "loc": { "start": { "line": 18, "column": 58 }, "end": { "line": 20, "column": 5 } } }, "generator": false, "expression": false, "range": [ 510, 600 ], "loc": { "start": { "line": 18, "column": 30 }, "end": { "line": 20, "column": 5 } } }, "range": [ 484, 600 ], "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 20, "column": 5 } } }, "range": [ 484, 601 ], "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 20, "column": 6 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "ScalarObservable", "range": [ 606, 622 ], "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 20 } } }, "property": { "type": "Identifier", "name": "dispatch", "range": [ 623, 631 ], "loc": { "start": { "line": 21, "column": 21 }, "end": { "line": 21, "column": 29 } } }, "range": [ 606, 631 ], "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 29 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "state", "range": [ 644, 649 ], "loc": { "start": { "line": 21, "column": 42 }, "end": { "line": 21, "column": 47 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "done", "range": [ 665, 669 ], "loc": { "start": { "line": 22, "column": 12 },