UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,527 lines (1,526 loc) 138 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": "*\n * Catches errors on the observable to be handled by returning a new observable or throwing an error.\n * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which\n * is the source observable, in case you'd like to \"retry\" that observable by returning it again. Whatever observable\n * is returned by the `selector` will be used to continue the observable chain.\n * @return {Observable} an observable that originates from either the source or the observable returned by the\n * catch `selector` function.\n * @method catch\n * @owner Observable\n ", "range": [ 117, 718 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 12, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "_catch", "range": [ 735, 741 ], "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 22 } } }, "params": [ { "type": "Identifier", "name": "selector", "range": [ 742, 750 ], "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 31 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "operator", "range": [ 762, 770 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 16 } } }, "init": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "CatchOperator", "range": [ 777, 790 ], "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 36 } } }, "arguments": [ { "type": "Identifier", "name": "selector", "range": [ 791, 799 ], "loc": { "start": { "line": 14, "column": 37 }, "end": { "line": 14, "column": 45 } } } ], "range": [ 773, 800 ], "loc": { "start": { "line": 14, "column": 19 }, "end": { "line": 14, "column": 46 } } }, "range": [ 762, 800 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 46 } } } ], "kind": "var", "range": [ 758, 801 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 47 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "caught", "range": [ 810, 816 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 819, 823 ], "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 21 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 824, 828 ], "loc": { "start": { "line": 15, "column": 22 }, "end": { "line": 15, "column": 26 } } }, "range": [ 819, 828 ], "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 26 } } }, "arguments": [ { "type": "Identifier", "name": "operator", "range": [ 829, 837 ], "loc": { "start": { "line": 15, "column": 27 }, "end": { "line": 15, "column": 35 } } } ], "range": [ 819, 838 ], "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 36 } } }, "range": [ 810, 838 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 36 } } } ], "kind": "var", "range": [ 806, 839 ], "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 37 } } }, { "type": "ReturnStatement", "argument": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "operator", "range": [ 852, 860 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 20 } } }, "property": { "type": "Identifier", "name": "caught", "range": [ 861, 867 ], "loc": { "start": { "line": 16, "column": 21 }, "end": { "line": 16, "column": 27 } } }, "range": [ 852, 867 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 27 } } }, "right": { "type": "Identifier", "name": "caught", "range": [ 870, 876 ], "loc": { "start": { "line": 16, "column": 30 }, "end": { "line": 16, "column": 36 } } }, "range": [ 852, 876 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 36 } } }, "range": [ 844, 878 ], "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 38 } } } ], "range": [ 752, 880 ], "loc": { "start": { "line": 13, "column": 33 }, "end": { "line": 17, "column": 1 } } }, "generator": false, "expression": false, "range": [ 726, 880 ], "loc": { "start": { "line": 13, "column": 7 }, "end": { "line": 17, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": "*\n * Catches errors on the observable to be handled by returning a new observable or throwing an error.\n * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which\n * is the source observable, in case you'd like to \"retry\" that observable by returning it again. Whatever observable\n * is returned by the `selector` will be used to continue the observable chain.\n * @return {Observable} an observable that originates from either the source or the observable returned by the\n * catch `selector` function.\n * @method catch\n * @owner Observable\n ", "range": [ 117, 718 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 12, "column": 3 } } } ], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 719, 880 ], "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 17, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": "*\n * Catches errors on the observable to be handled by returning a new observable or throwing an error.\n * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which\n * is the source observable, in case you'd like to \"retry\" that observable by returning it again. Whatever observable\n * is returned by the `selector` will be used to continue the observable chain.\n * @return {Observable} an observable that originates from either the source or the observable returned by the\n * catch `selector` function.\n * @method catch\n * @owner Observable\n ", "range": [ 117, 718 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 12, "column": 3 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "CatchOperator", "range": [ 885, 898 ], "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 17 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "CatchOperator", "range": [ 929, 942 ], "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 26 } } }, "params": [ { "type": "Identifier", "name": "selector", "range": [ 943, 951 ], "loc": { "start": { "line": 19, "column": 27 }, "end": { "line": 19, "column": 35 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 963, 967 ], "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 12 } } }, "property": { "type": "Identifier", "name": "selector", "range": [ 968, 976 ], "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 21 } } }, "range": [ 963, 976 ], "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 21 } } }, "right": { "type": "Identifier", "name": "selector", "range": [ 979, 987 ], "loc": { "start": { "line": 20, "column": 24 }, "end": { "line": 20, "column": 32 } } }, "range": [ 963, 987 ], "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 32 } } }, "range": [ 963, 988 ], "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 33 } } } ], "range": [ 953, 994 ], "loc": { "start": { "line": 19, "column": 37 }, "end": { "line": 21, "column": 5 } } }, "generator": false, "expression": false, "range": [ 920, 994 ], "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 21, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "CatchOperator", "range": [ 999, 1012 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 17 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 1013, 1022 ], "loc": { "start": { "line": 22, "column": 18 }, "end": { "line": 22, "column": 27 } } }, "range": [ 999, 1022 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 27 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 1023, 1027 ], "loc": { "start": { "line": 22, "column": 28 }, "end": { "line": 22, "column": 32 } } }, "range": [ 999, 1027 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 32 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "subscriber", "range": [ 1040, 1050 ], "loc": { "start": { "line": 22, "column": 45 }, "end": { "line": 22, "column": 55 } } }, { "type": "Identifier", "name": "source", "range": [ 1052, 1058 ], "loc": { "start": { "line": 22, "column": 57 }, "end": { "line": 22, "column": 63 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 1077, 1083 ], "loc": { "start": { "line": 23, "column": 15 }, "end": { "line": 23, "column": 21 } } }, "property": { "type": "Identifier", "name": "_subscribe", "range": [ 1084, 1094 ], "loc": { "start": { "line": 23, "column": 22 }, "end": { "line": 23, "column": 32 } } }, "range": [ 1077, 1094 ], "loc": { "start": { "line": 23, "column": 15 }, "end": { "line": 23, "column": 32 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "CatchSubscriber", "range": [ 1099, 1114 ], "loc": { "start": { "line": 23, "column": 37 }, "end": { "line": 23, "column": 52 } } }, "arguments": [ { "type": "Identifier", "name": "subscriber", "range": [ 1115, 1125 ], "loc": { "start": { "line": 23, "column": 53 }, "end": { "line": 23, "column": 63 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 1127, 1131 ], "loc": { "start": { "line": 23, "column": 65 }, "end": { "line": 23, "column": 69 } } }, "property": { "type": "Identifier", "name": "selector", "range": [ 1132, 1140 ], "loc": { "start": { "line": 23, "column": 70 }, "end": { "line": 23, "column": 78 } } }, "range": [ 1127, 1140 ], "loc": { "start": { "line": 23, "column": 65 }, "end": { "line": 23, "column": 78 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 1142, 1146 ], "loc": { "start": { "line": 23, "column": 80 }, "end": { "line": 23, "column": 84 } } }, "property": { "type": "Identifier", "name": "caught", "range": [ 1147, 1153 ], "loc": { "start": { "line": 23, "column": 85 }, "end": { "line": 23, "column": 91 } } }, "range": [ 1142, 1153 ], "loc": { "start": { "line": 23, "column": 80 }, "end": { "line": 23, "column": 91 } } } ], "range": [ 1095, 1154 ], "loc": { "start": { "line": 23, "column": 33 }, "end": { "line": 23, "column": 92 } } } ], "range": [ 1077, 1155 ], "loc": { "start": { "line": 23, "column": 15 }, "end": { "line": 23, "column": 93 } } }, "range": [ 1070, 1156 ], "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 94 } } } ], "range": [ 1060, 1162 ], "loc": { "start": { "line": 22, "column": 65 }, "end": { "line": 24, "column": 5 } } }, "generator": false, "expression": false, "range": [ 1030, 1162 ], "loc": { "start": { "line": 22, "column": 35 }, "end": { "line": 24, "column": 5 } } }, "range": [ 999, 1162 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 24, "column": 5 } } }, "range": [ 999, 1163 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 24, "column": 6 } } }, { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "CatchOperator", "range": [ 1175, 1188 ], "loc": { "start": { "line": 25, "column": 11 }, "end": { "line": 25, "column": 24 } } }, "range": [ 1168, 1189 ], "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 25 } } } ], "range": [ 914, 1191 ], "loc": { "start": { "line": 18, "column": 33 }, "end": { "line": 26, "column": 1 } } }, "generator": false, "expression": false, "range": [ 902, 1191 ], "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 26, "column": 1 } } }, "arguments": [], "range": [ 902, 1193 ], "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 26, "column": 3 } } }, "range": [ 885, 1194 ], "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 26, "column": 4 } } } ], "kind": "var", "range": [ 881, 1195 ], "loc": { "start": { "line": 18, "column": 0 }, "end": { "line": 26, "column": 5 } }, "trailingComments": [ { "type": "Block", "value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n ", "range": [ 1196, 1287 ], "loc": { "start": { "line": 27, "column": 0 }, "end": { "line": 31, "column": 3 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "CatchSubscriber", "range": [ 1292, 1307 ], "loc": { "start": { "line": 32, "column": 4 }, "end": { "line": 32, "column": 19