UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,544 lines (1,543 loc) 290 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 9, 24 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 24 } } }, "imported": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 9, 24 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 24 } } }, "range": [ 9, 24 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 24 } } } ], "source": { "type": "Literal", "value": "../OuterSubscriber", "raw": "'../OuterSubscriber'", "range": [ 32, 52 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 52 } } }, "range": [ 0, 53 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 53 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "subscribeToResult", "range": [ 63, 80 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 26 } } }, "imported": { "type": "Identifier", "name": "subscribeToResult", "range": [ 63, 80 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 26 } } }, "range": [ 63, 80 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 26 } } } ], "source": { "type": "Literal", "value": "../util/subscribeToResult", "raw": "'../util/subscribeToResult'", "range": [ 88, 115 ], "loc": { "start": { "line": 2, "column": 34 }, "end": { "line": 2, "column": 61 } } }, "range": [ 54, 116 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 62 } }, "trailingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 117, 153 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "switchMap", "range": [ 170, 179 ], "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 25 } } }, "params": [ { "type": "Identifier", "name": "project", "range": [ 180, 187 ], "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 33 } } }, { "type": "Identifier", "name": "resultSelector", "range": [ 189, 203 ], "loc": { "start": { "line": 4, "column": 35 }, "end": { "line": 4, "column": 49 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 218, 222 ], "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 223, 227 ], "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 20 } } }, "range": [ 218, 227 ], "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 20 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "SwitchMapOperator", "range": [ 232, 249 ], "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 5, "column": 42 } } }, "arguments": [ { "type": "Identifier", "name": "project", "range": [ 250, 257 ], "loc": { "start": { "line": 5, "column": 43 }, "end": { "line": 5, "column": 50 } } }, { "type": "Identifier", "name": "resultSelector", "range": [ 259, 273 ], "loc": { "start": { "line": 5, "column": 52 }, "end": { "line": 5, "column": 66 } } } ], "range": [ 228, 274 ], "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 67 } } } ], "range": [ 218, 275 ], "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 68 } } }, "range": [ 211, 276 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 69 } } } ], "range": [ 205, 278 ], "loc": { "start": { "line": 4, "column": 51 }, "end": { "line": 6, "column": 1 } } }, "generator": false, "expression": false, "range": [ 161, 278 ], "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 6, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 117, 153 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } } } ], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 154, 278 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 6, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 117, 153 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "SwitchMapOperator", "range": [ 283, 300 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 21 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "SwitchMapOperator", "range": [ 331, 348 ], "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 30 } } }, "params": [ { "type": "Identifier", "name": "project", "range": [ 349, 356 ], "loc": { "start": { "line": 8, "column": 31 }, "end": { "line": 8, "column": 38 } } }, { "type": "Identifier", "name": "resultSelector", "range": [ 358, 372 ], "loc": { "start": { "line": 8, "column": 40 }, "end": { "line": 8, "column": 54 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 384, 388 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 12 } } }, "property": { "type": "Identifier", "name": "project", "range": [ 389, 396 ], "loc": { "start": { "line": 9, "column": 13 }, "end": { "line": 9, "column": 20 } } }, "range": [ 384, 396 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 20 } } }, "right": { "type": "Identifier", "name": "project", "range": [ 399, 406 ], "loc": { "start": { "line": 9, "column": 23 }, "end": { "line": 9, "column": 30 } } }, "range": [ 384, 406 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 30 } } }, "range": [ 384, 407 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 31 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 416, 420 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "property": { "type": "Identifier", "name": "resultSelector", "range": [ 421, 435 ], "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 27 } } }, "range": [ 416, 435 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 27 } } }, "right": { "type": "Identifier", "name": "resultSelector", "range": [ 438, 452 ], "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 44 } } }, "range": [ 416, 452 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 44 } } }, "range": [ 416, 453 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 45 } } } ], "range": [ 374, 459 ], "loc": { "start": { "line": 8, "column": 56 }, "end": { "line": 11, "column": 5 } } }, "generator": false, "expression": false, "range": [ 322, 459 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 11, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "SwitchMapOperator", "range": [ 464, 481 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 21 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 482, 491 ], "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 31 } } }, "range": [ 464, 491 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 31 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 492, 496 ], "loc": { "start": { "line": 12, "column": 32 }, "end": { "line": 12, "column": 36 } } }, "range": [ 464, 496 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 36 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "subscriber", "range": [ 509, 519 ], "loc": { "start": { "line": 12, "column": 49 }, "end": { "line": 12, "column": 59 } } }, { "type": "Identifier", "name": "source", "range": [ 521, 527 ], "loc": { "start": { "line": 12, "column": 61 }, "end": { "line": 12, "column": 67 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 546, 552 ], "loc": { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 21 } } }, "property": { "type": "Identifier", "name": "_subscribe", "range": [ 553, 563 ], "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 32 } } }, "range": [ 546, 563 ], "loc": { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 32 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "SwitchMapSubscriber", "range": [ 568, 587 ], "loc": { "start": { "line": 13, "column": 37 }, "end": { "line": 13, "column": 56 } } }, "arguments": [ { "type": "Identifier", "name": "subscriber", "range": [ 588, 598 ], "loc": { "start": { "line": 13, "column": 57 }, "end": { "line": 13, "column": 67 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 600, 604 ], "loc": { "start": { "line": 13, "column": 69 }, "end": { "line": 13, "column": 73 } } }, "property": { "type": "Identifier", "name": "project", "range": [ 605, 612 ], "loc": { "start": { "line": 13, "column": 74 }, "end": { "line": 13, "column": 81 } } }, "range": [ 600, 612 ], "loc": { "start": { "line": 13, "column": 69 }, "end": { "line": 13, "column": 81 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 614, 618 ], "loc": { "start": { "line": 13, "column": 83 }, "end": { "line": 13, "column": 87 } } }, "property": { "type": "Identifier", "name": "resultSelector", "range": [ 619, 633 ], "loc": { "start": { "line": 13, "column": 88 }, "end": { "line": 13, "column": 102 } } }, "range": [ 614, 633 ], "loc": { "start": { "line": 13, "column": 83 }, "end": { "line": 13, "column": 102 } } } ], "range": [ 564, 634 ], "loc": { "start": { "line": 13, "column": 33 }, "end": { "line": 13, "column": 103 } } } ], "range": [ 546, 635 ], "loc": { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 104 } } }, "range": [ 539, 636 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 105 } } } ], "range": [ 529, 642 ], "loc": { "start": { "line": 12, "column": 69 }, "end": { "line": 14, "column": 5 } } }, "generator": false, "expression": false, "range": [ 499, 642 ], "loc": { "start": { "line": 12, "column": 39 }, "end": { "line": 14, "column": 5 } } }, "range": [ 464, 642 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 14, "column": 5 } } }, "range": [ 464, 643 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 14, "column": 6 } } }, { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "SwitchMapOperator", "range": [ 655, 672 ], "loc": { "start": { "line": 15, "column": 11 }, "end": { "line": 15, "column": 28 } } }, "range": [ 648, 673 ], "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 29 } } } ], "range": [ 316, 675 ], "loc": { "start": { "line": 7, "column": 37 }, "end": { "line": 16, "column": 1 } } }, "generator": false, "expression": false, "range": [ 304, 675 ], "loc": { "start": { "line": 7, "column": 25 }, "end": { "line": 16, "column": 1 } } }, "arguments": [], "range": [ 304, 677 ], "loc": { "start": { "line": 7, "column": 25 }, "end": { "line": 16, "column": 3 } } }, "range": [ 283, 678 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 16, "column": 4 } } } ], "kind": "var", "range": [ 279, 679 ], "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 16, "column": 5 } }, "trailingComments": [ { "type": "Block", "value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n ", "range": [ 680, 771 ], "loc": { "start": { "line": 17, "column": 0 }, "end": { "line": 21, "column": 3 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "SwitchMapSubscriber", "range": [ 776, 795 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 23 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "_super", "range": [ 809, 815 ], "loc": { "start": { "line": 22, "column": 37 }, "end": { "line": 22, "column": 43 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "__extends", "range": [ 823, 832 ], "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 13 } } }, "arguments": [ { "type": "Identifier", "name": "SwitchMapSubscriber", "range": [ 833, 852 ], "loc": { "start": { "line": 23, "column": 14 }, "end": { "line": 23, "column": 33 } } }, { "type": "Identifier", "name": "_super",