UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,565 lines (1,564 loc) 111 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Subscriber", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, "imported": { "type": "Identifier", "name": "Subscriber", "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": "../Subscriber", "raw": "'../Subscriber'", "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": " tslint:disable:max-line-length ", "range": [ 44, 80 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 36 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "defaultIfEmpty", "range": [ 97, 111 ], "loc": { "start": { "line": 3, "column": 16 }, "end": { "line": 3, "column": 30 } } }, "params": [ { "type": "Identifier", "name": "defaultValue", "range": [ 112, 124 ], "loc": { "start": { "line": 3, "column": 31 }, "end": { "line": 3, "column": 43 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "defaultValue", "range": [ 136, 148 ], "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 20 } } }, "right": { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Literal", "value": 0, "raw": "0", "range": [ 158, 159 ], "loc": { "start": { "line": 4, "column": 30 }, "end": { "line": 4, "column": 31 } } }, "prefix": true, "range": [ 153, 159 ], "loc": { "start": { "line": 4, "column": 25 }, "end": { "line": 4, "column": 31 } } }, "range": [ 136, 159 ], "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 31 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "defaultValue", "range": [ 163, 175 ], "loc": { "start": { "line": 4, "column": 35 }, "end": { "line": 4, "column": 47 } } }, "right": { "type": "Literal", "value": null, "raw": "null", "range": [ 178, 182 ], "loc": { "start": { "line": 4, "column": 50 }, "end": { "line": 4, "column": 54 } } }, "range": [ 163, 182 ], "loc": { "start": { "line": 4, "column": 35 }, "end": { "line": 4, "column": 54 } } }, "range": [ 163, 183 ], "loc": { "start": { "line": 4, "column": 35 }, "end": { "line": 4, "column": 55 } } } ], "range": [ 161, 185 ], "loc": { "start": { "line": 4, "column": 33 }, "end": { "line": 4, "column": 57 } } }, "alternate": null, "range": [ 132, 185 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 57 } } }, { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 197, 201 ], "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 202, 206 ], "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 20 } } }, "range": [ 197, 206 ], "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 20 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "DefaultIfEmptyOperator", "range": [ 211, 233 ], "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 5, "column": 47 } } }, "arguments": [ { "type": "Identifier", "name": "defaultValue", "range": [ 234, 246 ], "loc": { "start": { "line": 5, "column": 48 }, "end": { "line": 5, "column": 60 } } } ], "range": [ 207, 247 ], "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 61 } } } ], "range": [ 197, 248 ], "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 62 } } }, "range": [ 190, 249 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 63 } } } ], "range": [ 126, 251 ], "loc": { "start": { "line": 3, "column": 45 }, "end": { "line": 6, "column": 1 } } }, "generator": false, "expression": false, "range": [ 88, 251 ], "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 6, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 44, 80 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 36 } } } ], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 81, 251 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 6, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 44, 80 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 36 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "DefaultIfEmptyOperator", "range": [ 256, 278 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 26 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "DefaultIfEmptyOperator", "range": [ 309, 331 ], "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 35 } } }, "params": [ { "type": "Identifier", "name": "defaultValue", "range": [ 332, 344 ], "loc": { "start": { "line": 8, "column": 36 }, "end": { "line": 8, "column": 48 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 356, 360 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 12 } } }, "property": { "type": "Identifier", "name": "defaultValue", "range": [ 361, 373 ], "loc": { "start": { "line": 9, "column": 13 }, "end": { "line": 9, "column": 25 } } }, "range": [ 356, 373 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 25 } } }, "right": { "type": "Identifier", "name": "defaultValue", "range": [ 376, 388 ], "loc": { "start": { "line": 9, "column": 28 }, "end": { "line": 9, "column": 40 } } }, "range": [ 356, 388 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 40 } } }, "range": [ 356, 389 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 41 } } } ], "range": [ 346, 395 ], "loc": { "start": { "line": 8, "column": 50 }, "end": { "line": 10, "column": 5 } } }, "generator": false, "expression": false, "range": [ 300, 395 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 10, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "DefaultIfEmptyOperator", "range": [ 400, 422 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 26 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 423, 432 ], "loc": { "start": { "line": 11, "column": 27 }, "end": { "line": 11, "column": 36 } } }, "range": [ 400, 432 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 36 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 433, 437 ], "loc": { "start": { "line": 11, "column": 37 }, "end": { "line": 11, "column": 41 } } }, "range": [ 400, 437 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 41 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "subscriber", "range": [ 450, 460 ], "loc": { "start": { "line": 11, "column": 54 }, "end": { "line": 11, "column": 64 } } }, { "type": "Identifier", "name": "source", "range": [ 462, 468 ], "loc": { "start": { "line": 11, "column": 66 }, "end": { "line": 11, "column": 72 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 487, 493 ], "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 21 } } }, "property": { "type": "Identifier", "name": "_subscribe", "range": [ 494, 504 ], "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 32 } } }, "range": [ 487, 504 ], "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 32 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "DefaultIfEmptySubscriber", "range": [ 509, 533 ], "loc": { "start": { "line": 12, "column": 37 }, "end": { "line": 12, "column": 61 } } }, "arguments": [ { "type": "Identifier", "name": "subscriber", "range": [ 534, 544 ], "loc": { "start": { "line": 12, "column": 62 }, "end": { "line": 12, "column": 72 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 546, 550 ], "loc": { "start": { "line": 12, "column": 74 }, "end": { "line": 12, "column": 78 } } }, "property": { "type": "Identifier", "name": "defaultValue", "range": [ 551, 563 ], "loc": { "start": { "line": 12, "column": 79 }, "end": { "line": 12, "column": 91 } } }, "range": [ 546, 563 ], "loc": { "start": { "line": 12, "column": 74 }, "end": { "line": 12, "column": 91 } } } ], "range": [ 505, 564 ], "loc": { "start": { "line": 12, "column": 33 }, "end": { "line": 12, "column": 92 } } } ], "range": [ 487, 565 ], "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 93 } } }, "range": [ 480, 566 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 94 } } } ], "range": [ 470, 572 ], "loc": { "start": { "line": 11, "column": 74 }, "end": { "line": 13, "column": 5 } } }, "generator": false, "expression": false, "range": [ 440, 572 ], "loc": { "start": { "line": 11, "column": 44 }, "end": { "line": 13, "column": 5 } } }, "range": [ 400, 572 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 13, "column": 5 } } }, "range": [ 400, 573 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 13, "column": 6 } } }, { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "DefaultIfEmptyOperator", "range": [ 585, 607 ], "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 33 } } }, "range": [ 578, 608 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 34 } } } ], "range": [ 294, 610 ], "loc": { "start": { "line": 7, "column": 42 }, "end": { "line": 15, "column": 1 } } }, "generator": false, "expression": false, "range": [ 282, 610 ], "loc": { "start": { "line": 7, "column": 30 }, "end": { "line": 15, "column": 1 } } }, "arguments": [], "range": [ 282, 612 ], "loc": { "start": { "line": 7, "column": 30 }, "end": { "line": 15, "column": 3 } } }, "range": [ 256, 613 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 15, "column": 4 } } } ], "kind": "var", "range": [ 252, 614 ], "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 15, "column": 5 } }, "trailingComments": [ { "type": "Block", "value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n ", "range": [ 615, 706 ], "loc": { "start": { "line": 16, "column": 0 }, "end": { "line": 20, "column": 3 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "DefaultIfEmptySubscriber", "range": [ 711, 735 ], "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 28 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "_super", "range": [ 749, 755 ], "loc": { "start": { "line": 21, "column": 42 }, "end": { "line": 21, "column": 48 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "__extends", "range": [ 763, 772 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 13 } } }, "arguments": [ { "type": "Identifier", "name": "DefaultIfEmptySubscriber", "range": [ 773, 797 ], "loc": { "start": { "line": 22, "column": 14 }, "end": { "line": 22, "column": 38 } } }, { "type": "Identifier", "name": "_super", "range": [ 799, 805 ], "loc": { "start": { "line": 22, "column": 40 }, "end": { "line": 22, "column": 46 } } } ], "range": [ 763, 806 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 47 } } }, "range": [ 763, 807 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 48 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "DefaultIfEmptySubscriber", "range": [ 821, 845 ], "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 37 } } }, "params": [ { "type": "Identifier", "name": "destination", "range": [ 846, 857 ], "loc": { "start": { "line": 23, "column": 38 }, "end": { "line": 23, "column": 49 } } }, { "type": "Identifier", "name": "defaultValue", "range": [ 859, 871 ], "loc": { "start": { "line": 23, "column": 51 }, "end": { "line": 23, "column": 63 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "_super", "range": [ 883, 889 ], "loc": { "start": { "line": 24, "column": 8 }, "end": { "line": 24, "column": 14 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 890, 894 ], "loc": { "start": { "line": 24,