UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,406 lines (1,405 loc) 175 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 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "subscribeToResult", "range": [ 53, 70 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 26 } } }, "imported": { "type": "Identifier", "name": "subscribeToResult", "range": [ 53, 70 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 26 } } }, "range": [ 53, 70 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 26 } } } ], "source": { "type": "Literal", "value": "../util/subscribeToResult", "raw": "'../util/subscribeToResult'", "range": [ 78, 105 ], "loc": { "start": { "line": 2, "column": 34 }, "end": { "line": 2, "column": 61 } } }, "range": [ 44, 106 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 62 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 116, 131 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } }, "imported": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 116, 131 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } }, "range": [ 116, 131 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } } ], "source": { "type": "Literal", "value": "../OuterSubscriber", "raw": "'../OuterSubscriber'", "range": [ 139, 159 ], "loc": { "start": { "line": 3, "column": 32 }, "end": { "line": 3, "column": 52 } } }, "range": [ 107, 160 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 53 } }, "trailingComments": [ { "type": "Block", "value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n ", "range": [ 161, 255 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 8, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "IfObservable", "range": [ 267, 279 ], "loc": { "start": { "line": 9, "column": 11 }, "end": { "line": 9, "column": 23 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "_super", "range": [ 293, 299 ], "loc": { "start": { "line": 9, "column": 37 }, "end": { "line": 9, "column": 43 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "__extends", "range": [ 307, 316 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 13 } } }, "arguments": [ { "type": "Identifier", "name": "IfObservable", "range": [ 317, 329 ], "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 10, "column": 26 } } }, { "type": "Identifier", "name": "_super", "range": [ 331, 337 ], "loc": { "start": { "line": 10, "column": 28 }, "end": { "line": 10, "column": 34 } } } ], "range": [ 307, 338 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 35 } } }, "range": [ 307, 339 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 36 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "IfObservable", "range": [ 353, 365 ], "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 25 } } }, "params": [ { "type": "Identifier", "name": "condition", "range": [ 366, 375 ], "loc": { "start": { "line": 11, "column": 26 }, "end": { "line": 11, "column": 35 } } }, { "type": "Identifier", "name": "thenSource", "range": [ 377, 387 ], "loc": { "start": { "line": 11, "column": 37 }, "end": { "line": 11, "column": 47 } } }, { "type": "Identifier", "name": "elseSource", "range": [ 389, 399 ], "loc": { "start": { "line": 11, "column": 49 }, "end": { "line": 11, "column": 59 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "_super", "range": [ 411, 417 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 14 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 418, 422 ], "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 19 } } }, "range": [ 411, 422 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 19 } } }, "arguments": [ { "type": "ThisExpression", "range": [ 423, 427 ], "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 24 } } } ], "range": [ 411, 428 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 25 } } }, "range": [ 411, 429 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 26 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 438, 442 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } }, "property": { "type": "Identifier", "name": "condition", "range": [ 443, 452 ], "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 22 } } }, "range": [ 438, 452 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 22 } } }, "right": { "type": "Identifier", "name": "condition", "range": [ 455, 464 ], "loc": { "start": { "line": 13, "column": 25 }, "end": { "line": 13, "column": 34 } } }, "range": [ 438, 464 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 34 } } }, "range": [ 438, 465 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 35 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 474, 478 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 12 } } }, "property": { "type": "Identifier", "name": "thenSource", "range": [ 479, 489 ], "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 23 } } }, "range": [ 474, 489 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 23 } } }, "right": { "type": "Identifier", "name": "thenSource", "range": [ 492, 502 ], "loc": { "start": { "line": 14, "column": 26 }, "end": { "line": 14, "column": 36 } } }, "range": [ 474, 502 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 36 } } }, "range": [ 474, 503 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 37 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 512, 516 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 12 } } }, "property": { "type": "Identifier", "name": "elseSource", "range": [ 517, 527 ], "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 23 } } }, "range": [ 512, 527 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 23 } } }, "right": { "type": "Identifier", "name": "elseSource", "range": [ 530, 540 ], "loc": { "start": { "line": 15, "column": 26 }, "end": { "line": 15, "column": 36 } } }, "range": [ 512, 540 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 36 } } }, "range": [ 512, 541 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 37 } } } ], "range": [ 401, 547 ], "loc": { "start": { "line": 11, "column": 61 }, "end": { "line": 16, "column": 5 } } }, "generator": false, "expression": false, "range": [ 344, 547 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 16, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "IfObservable", "range": [ 552, 564 ], "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 16 } } }, "property": { "type": "Identifier", "name": "create", "range": [ 565, 571 ], "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 23 } } }, "range": [ 552, 571 ], "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 23 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "condition", "range": [ 584, 593 ], "loc": { "start": { "line": 17, "column": 36 }, "end": { "line": 17, "column": 45 } } }, { "type": "Identifier", "name": "thenSource", "range": [ 595, 605 ], "loc": { "start": { "line": 17, "column": 47 }, "end": { "line": 17, "column": 57 } } }, { "type": "Identifier", "name": "elseSource", "range": [ 607, 617 ], "loc": { "start": { "line": 17, "column": 59 }, "end": { "line": 17, "column": 69 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "IfObservable", "range": [ 640, 652 ], "loc": { "start": { "line": 18, "column": 19 }, "end": { "line": 18, "column": 31 } } }, "arguments": [ { "type": "Identifier", "name": "condition", "range": [ 653, 662 ], "loc": { "start": { "line": 18, "column": 32 }, "end": { "line": 18, "column": 41 } } }, { "type": "Identifier", "name": "thenSource", "range": [ 664, 674 ], "loc": { "start": { "line": 18, "column": 43 }, "end": { "line": 18, "column": 53 } } }, { "type": "Identifier", "name": "elseSource", "range": [ 676, 686 ], "loc": { "start": { "line": 18, "column": 55 }, "end": { "line": 18, "column": 65 } } } ], "range": [ 636, 687 ], "loc": { "start": { "line": 18, "column": 15 }, "end": { "line": 18, "column": 66 } } }, "range": [ 629, 688 ], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 67 } } } ], "range": [ 619, 694 ], "loc": { "start": { "line": 17, "column": 71 }, "end": { "line": 19, "column": 5 } } }, "generator": false, "expression": false, "range": [ 574, 694 ], "loc": { "start": { "line": 17, "column": 26 }, "end": { "line": 19, "column": 5 } } }, "range": [ 552, 694 ], "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 19, "column": 5 } } }, "range": [ 552, 695 ], "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 19, "column": 6 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "IfObservable", "range": [ 700, 712 ], "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 16 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 713, 722 ], "loc": { "start": { "line": 20, "column": 17 }, "end": { "line": 20, "column": 26 } } }, "range": [ 700, 722 ], "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 26 } } }, "property": { "type": "Identifier", "name": "_subscribe", "range": [ 723, 733 ], "loc": { "start": { "line": 20, "column": 27 }, "end": { "line": 20, "column": 37 } } }, "range": [ 700, 733 ], "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 37 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "subscriber", "range": [ 746, 756 ], "loc": { "start": { "line": 20, "column": 50 }, "end": { "line": 20, "column": 60 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "_a", "range": [ 772, 774 ], "loc": { "start": { "line": 21, "column": 12