UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,727 lines (1,726 loc) 417 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "tryCatch", "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } }, "imported": { "type": "Identifier", "name": "tryCatch", "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } }, "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } } ], "source": { "type": "Literal", "value": "../util/tryCatch", "raw": "'../util/tryCatch'", "range": [ 25, 43 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 43 } } }, "range": [ 0, 44 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 44 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "errorObject", "range": [ 54, 65 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 20 } } }, "imported": { "type": "Identifier", "name": "errorObject", "range": [ 54, 65 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 20 } } }, "range": [ 54, 65 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 20 } } } ], "source": { "type": "Literal", "value": "../util/errorObject", "raw": "'../util/errorObject'", "range": [ 73, 94 ], "loc": { "start": { "line": 2, "column": 28 }, "end": { "line": 2, "column": 49 } } }, "range": [ 45, 95 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 50 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 105, 120 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } }, "imported": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 105, 120 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } }, "range": [ 105, 120 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 24 } } } ], "source": { "type": "Literal", "value": "../OuterSubscriber", "raw": "'../OuterSubscriber'", "range": [ 128, 148 ], "loc": { "start": { "line": 3, "column": 32 }, "end": { "line": 3, "column": 52 } } }, "range": [ 96, 149 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 53 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "subscribeToResult", "range": [ 159, 176 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 26 } } }, "imported": { "type": "Identifier", "name": "subscribeToResult", "range": [ 159, 176 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 26 } } }, "range": [ 159, 176 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 26 } } } ], "source": { "type": "Literal", "value": "../util/subscribeToResult", "raw": "'../util/subscribeToResult'", "range": [ 184, 211 ], "loc": { "start": { "line": 4, "column": 34 }, "end": { "line": 4, "column": 61 } } }, "range": [ 150, 212 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 62 } }, "trailingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 213, 249 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 36 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "expand", "range": [ 266, 272 ], "loc": { "start": { "line": 6, "column": 16 }, "end": { "line": 6, "column": 22 } } }, "params": [ { "type": "Identifier", "name": "project", "range": [ 273, 280 ], "loc": { "start": { "line": 6, "column": 23 }, "end": { "line": 6, "column": 30 } } }, { "type": "Identifier", "name": "concurrent", "range": [ 282, 292 ], "loc": { "start": { "line": 6, "column": 32 }, "end": { "line": 6, "column": 42 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 294, 303 ], "loc": { "start": { "line": 6, "column": 44 }, "end": { "line": 6, "column": 53 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "concurrent", "range": [ 315, 325 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 18 } } }, "right": { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Literal", "value": 0, "raw": "0", "range": [ 335, 336 ], "loc": { "start": { "line": 7, "column": 28 }, "end": { "line": 7, "column": 29 } } }, "prefix": true, "range": [ 330, 336 ], "loc": { "start": { "line": 7, "column": 23 }, "end": { "line": 7, "column": 29 } } }, "range": [ 315, 336 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 29 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "concurrent", "range": [ 340, 350 ], "loc": { "start": { "line": 7, "column": 33 }, "end": { "line": 7, "column": 43 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Number", "range": [ 353, 359 ], "loc": { "start": { "line": 7, "column": 46 }, "end": { "line": 7, "column": 52 } } }, "property": { "type": "Identifier", "name": "POSITIVE_INFINITY", "range": [ 360, 377 ], "loc": { "start": { "line": 7, "column": 53 }, "end": { "line": 7, "column": 70 } } }, "range": [ 353, 377 ], "loc": { "start": { "line": 7, "column": 46 }, "end": { "line": 7, "column": 70 } } }, "range": [ 340, 377 ], "loc": { "start": { "line": 7, "column": 33 }, "end": { "line": 7, "column": 70 } } }, "range": [ 340, 378 ], "loc": { "start": { "line": 7, "column": 33 }, "end": { "line": 7, "column": 71 } } } ], "range": [ 338, 380 ], "loc": { "start": { "line": 7, "column": 31 }, "end": { "line": 7, "column": 73 } } }, "alternate": null, "range": [ 311, 380 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 73 } } }, { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "scheduler", "range": [ 389, 398 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 17 } } }, "right": { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Literal", "value": 0, "raw": "0", "range": [ 408, 409 ], "loc": { "start": { "line": 8, "column": 27 }, "end": { "line": 8, "column": 28 } } }, "prefix": true, "range": [ 403, 409 ], "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 28 } } }, "range": [ 389, 409 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 28 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "scheduler", "range": [ 413, 422 ], "loc": { "start": { "line": 8, "column": 32 }, "end": { "line": 8, "column": 41 } } }, "right": { "type": "Identifier", "name": "undefined", "range": [ 425, 434 ], "loc": { "start": { "line": 8, "column": 44 }, "end": { "line": 8, "column": 53 } } }, "range": [ 413, 434 ], "loc": { "start": { "line": 8, "column": 32 }, "end": { "line": 8, "column": 53 } } }, "range": [ 413, 435 ], "loc": { "start": { "line": 8, "column": 32 }, "end": { "line": 8, "column": 54 } } } ], "range": [ 411, 437 ], "loc": { "start": { "line": 8, "column": 30 }, "end": { "line": 8, "column": 56 } } }, "alternate": null, "range": [ 385, 437 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 56 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "concurrent", "range": [ 442, 452 ], "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 14 } } }, "right": { "type": "ConditionalExpression", "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "LogicalExpression", "operator": "||", "left": { "type": "Identifier", "name": "concurrent", "range": [ 456, 466 ], "loc": { "start": { "line": 9, "column": 18 }, "end": { "line": 9, "column": 28 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 470, 471 ], "loc": { "start": { "line": 9, "column": 32 }, "end": { "line": 9, "column": 33 } } }, "range": [ 456, 471 ], "loc": { "start": { "line": 9, "column": 18 }, "end": { "line": 9, "column": 33 } } }, "right": { "type": "Literal", "value": 1, "raw": "1", "range": [ 475, 476 ], "loc": { "start": { "line": 9, "column": 37 }, "end": { "line": 9, "column": 38 } } }, "range": [ 455, 476 ], "loc": { "start": { "line": 9, "column": 17 }, "end": { "line": 9, "column": 38 } } }, "consequent": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Number", "range": [ 479, 485 ], "loc": { "start": { "line": 9, "column": 41 }, "end": { "line": 9, "column": 47 } } }, "property": { "type": "Identifier", "name": "POSITIVE_INFINITY", "range": [ 486, 503 ], "loc": { "start": { "line": 9, "column": 48 }, "end": { "line": 9, "column": 65 } } }, "range": [ 479, 503 ], "loc": { "start": { "line": 9, "column": 41 }, "end": { "line": 9, "column": 65 } } }, "alternate": { "type": "Identifier", "name": "concurrent", "range": [ 506, 516 ], "loc": { "start": { "line": 9, "column": 68 }, "end": { "line": 9, "column": 78 } } }, "range": [ 455, 516 ], "loc": { "start": { "line": 9, "column": 17 }, "end": { "line": 9, "column": 78 } } }, "range": [ 442, 516 ], "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 78 } } }, "range": [ 442, 517 ], "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 79 } } }, { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 529, 533 ], "loc": { "start": { "line": 10, "column": 11 }, "end": { "line": 10, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 534, 538 ], "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 20 } } }, "range": [ 529, 538 ], "loc": { "start": { "line": 10, "column": 11 }, "end": { "line": 10, "column": 20 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "ExpandOperator", "range": [ 543, 557 ], "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 39 } } }, "arguments": [ { "type": "Identifier", "name": "project", "range": [ 558, 565 ], "loc": { "start": { "line": 10, "column": 40 }, "end": { "line": 10, "column": 47 } } }, { "type": "Identifier", "name": "concurrent", "range": [ 567, 577 ], "loc": { "start": { "line": 10, "column": 49 }, "end": { "line": 10, "column": 59 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 579, 588 ], "loc": { "start": { "line": 10, "column": 61 }, "end": { "line": 10, "column": 70 } } } ], "range": [ 539, 589 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 71 } } } ], "range": [ 529, 590 ], "loc": { "start": { "line": 10, "column": 11 }, "end": { "line": 10, "column": 72 } } }, "range": [ 522, 591 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 73 } } } ], "range": [ 305, 593 ], "loc": { "start": { "line": 6, "column": 55 }, "end": { "line": 11, "column": 1 } } }, "generator": false, "expression": false, "range": [ 257, 593 ], "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 11, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 213, 249 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 36 } } } ], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 250, 593 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 11, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 213, 249 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 36 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "ExpandOperator", "range": [ 605, 619 ], "loc": { "start": { "line": 12, "column": 11 }, "end": { "line": 12, "column": 25 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "ExpandOperator", "range": [ 650, 664 ], "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 27 } } }, "params": [ { "type": "Identifier", "name": "project", "range": [ 665, 672 ], "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 35 } } }, { "type": "Identifier", "name": "concurrent", "range": [ 674, 684 ], "loc": { "start": { "line": 13, "column": 37 }, "end": { "line": 13, "column": 47 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 686, 695 ], "loc": { "start": { "line": 13, "column": 49 }, "end": { "line": 13, "column": 58 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 707, 711 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 12 } } }, "property": { "type": "Identifier", "name": "project", "range": [ 712, 719 ], "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 20 } } }, "range": [ 707, 719 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 20 } } }, "right": { "type": "Identifier", "name": "project", "range": [ 722, 729 ], "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 30 } } }, "range": [ 707, 729 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 30 } } }, "range": [ 707, 730 ], "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": [ 739, 743 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 12 } } }, "property": { "type": "Identifier", "name": "concurrent", "range": [ 744, 754 ], "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 23 } } }, "range": [ 739, 754 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 23 } } }, "right": { "type": "Identifier", "name": "concurrent", "range": [ 757, 767 ], "loc": { "start": { "line": 15, "column": 26 }, "end": { "line": 15, "column": 36 } } }, "range": [ 739, 767 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 36 } } }, "range": [ 739, 768 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 37 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 777, 781 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "name": "scheduler",