UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,482 lines (1,481 loc) 326 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 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "EmptyError", "range": [ 53, 63 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } }, "imported": { "type": "Identifier", "name": "EmptyError", "range": [ 53, 63 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } }, "range": [ 53, 63 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } } ], "source": { "type": "Literal", "value": "../util/EmptyError", "raw": "'../util/EmptyError'", "range": [ 71, 91 ], "loc": { "start": { "line": 2, "column": 27 }, "end": { "line": 2, "column": 47 } } }, "range": [ 44, 92 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 48 } }, "trailingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 93, 129 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "first", "range": [ 146, 151 ], "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 21 } } }, "params": [ { "type": "Identifier", "name": "predicate", "range": [ 152, 161 ], "loc": { "start": { "line": 4, "column": 22 }, "end": { "line": 4, "column": 31 } } }, { "type": "Identifier", "name": "resultSelector", "range": [ 163, 177 ], "loc": { "start": { "line": 4, "column": 33 }, "end": { "line": 4, "column": 47 } } }, { "type": "Identifier", "name": "defaultValue", "range": [ 179, 191 ], "loc": { "start": { "line": 4, "column": 49 }, "end": { "line": 4, "column": 61 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 206, 210 ], "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 211, 215 ], "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 20 } } }, "range": [ 206, 215 ], "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 20 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "FirstOperator", "range": [ 220, 233 ], "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 5, "column": 38 } } }, "arguments": [ { "type": "Identifier", "name": "predicate", "range": [ 234, 243 ], "loc": { "start": { "line": 5, "column": 39 }, "end": { "line": 5, "column": 48 } } }, { "type": "Identifier", "name": "resultSelector", "range": [ 245, 259 ], "loc": { "start": { "line": 5, "column": 50 }, "end": { "line": 5, "column": 64 } } }, { "type": "Identifier", "name": "defaultValue", "range": [ 261, 273 ], "loc": { "start": { "line": 5, "column": 66 }, "end": { "line": 5, "column": 78 } } }, { "type": "ThisExpression", "range": [ 275, 279 ], "loc": { "start": { "line": 5, "column": 80 }, "end": { "line": 5, "column": 84 } } } ], "range": [ 216, 280 ], "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 85 } } } ], "range": [ 206, 281 ], "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 86 } } }, "range": [ 199, 282 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 87 } } } ], "range": [ 193, 284 ], "loc": { "start": { "line": 4, "column": 63 }, "end": { "line": 6, "column": 1 } } }, "generator": false, "expression": false, "range": [ 137, 284 ], "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 6, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 93, 129 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } } } ], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 130, 284 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 6, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 93, 129 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "FirstOperator", "range": [ 289, 302 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 17 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "FirstOperator", "range": [ 333, 346 ], "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 26 } } }, "params": [ { "type": "Identifier", "name": "predicate", "range": [ 347, 356 ], "loc": { "start": { "line": 8, "column": 27 }, "end": { "line": 8, "column": 36 } } }, { "type": "Identifier", "name": "resultSelector", "range": [ 358, 372 ], "loc": { "start": { "line": 8, "column": 38 }, "end": { "line": 8, "column": 52 } } }, { "type": "Identifier", "name": "defaultValue", "range": [ 374, 386 ], "loc": { "start": { "line": 8, "column": 54 }, "end": { "line": 8, "column": 66 } } }, { "type": "Identifier", "name": "source", "range": [ 388, 394 ], "loc": { "start": { "line": 8, "column": 68 }, "end": { "line": 8, "column": 74 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 406, 410 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 12 } } }, "property": { "type": "Identifier", "name": "predicate", "range": [ 411, 420 ], "loc": { "start": { "line": 9, "column": 13 }, "end": { "line": 9, "column": 22 } } }, "range": [ 406, 420 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 22 } } }, "right": { "type": "Identifier", "name": "predicate", "range": [ 423, 432 ], "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 34 } } }, "range": [ 406, 432 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 34 } } }, "range": [ 406, 433 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 35 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 442, 446 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "property": { "type": "Identifier", "name": "resultSelector", "range": [ 447, 461 ], "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 27 } } }, "range": [ 442, 461 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 27 } } }, "right": { "type": "Identifier", "name": "resultSelector", "range": [ 464, 478 ], "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 44 } } }, "range": [ 442, 478 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 44 } } }, "range": [ 442, 479 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 45 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 488, 492 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } } }, "property": { "type": "Identifier", "name": "defaultValue", "range": [ 493, 505 ], "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 25 } } }, "range": [ 488, 505 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 25 } } }, "right": { "type": "Identifier", "name": "defaultValue", "range": [ 508, 520 ], "loc": { "start": { "line": 11, "column": 28 }, "end": { "line": 11, "column": 40 } } }, "range": [ 488, 520 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 40 } } }, "range": [ 488, 521 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 41 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 530, 534 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "name": "source", "range": [ 535, 541 ], "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 19 } } }, "range": [ 530, 541 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 19 } } }, "right": { "type": "Identifier", "name": "source", "range": [ 544, 550 ], "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 28 } } }, "range": [ 530, 550 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 28 } } }, "range": [ 530, 551 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 29 } } } ], "range": [ 396, 557 ], "loc": { "start": { "line": 8, "column": 76 }, "end": { "line": 13, "column": 5 } } }, "generator": false, "expression": false, "range": [ 324, 557 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 13, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "FirstOperator", "range": [ 562, 575 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 17 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 576, 585 ], "loc": { "start": { "line": 14, "column": 18 }, "end": { "line": 14, "column": 27 } } }, "range": [ 562, 585 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 27 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 586, 590 ], "loc": { "start": { "line": 14, "column": 28 }, "end": { "line": 14, "column": 32 } } }, "range": [ 562, 590 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 32 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "observer", "range": [ 603, 611 ], "loc": { "start": { "line": 14, "column": 45 }, "end": { "line": 14, "column": 53 } } }, { "type": "Identifier", "name": "source", "range": [ 613, 619 ], "loc": { "start": { "line": 14, "column": 55 }, "end": { "line": 14, "column": 61 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 638, 644 ], "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 15, "column": 21 } } }, "property": { "type": "Identifier", "name": "_subscribe", "range": [ 645, 655 ], "loc": { "start": { "line": 15, "column": 22 }, "end": { "line": 15, "column": 32 } } }, "range": [ 638, 655 ], "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 15, "column": 32 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "FirstSubscriber", "range": [ 660, 675 ], "loc": { "start": { "line": 15, "column": 37 }, "end": { "line": 15, "column": 52 } } }, "arguments": [ { "type": "Identifier", "name": "observer", "range": [ 676, 684 ], "loc": { "start": { "line": 15, "column": 53 }, "end": { "line": 15, "column": 61 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 686, 690 ], "loc": { "start": { "line": 15, "column": 63 }, "end": { "line": 15, "column": 67 } } }, "property": { "type": "Identifier", "name": "predicate", "range": [ 691, 700 ], "loc": { "start": { "line": 15, "column": 68 }, "end": { "line": 15, "column": 77 } } }, "range": [ 686, 700 ], "loc": { "start": { "line": 15, "column": 63 }, "end": { "line": 15, "column": 77 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 702, 706 ], "loc": { "start": { "line": 15, "column": 79 }, "end": { "line": 15, "column": 83 } } }, "property": { "type": "Identifier", "name": "resultSelector", "range": [ 707, 721 ], "loc": { "start": { "line": 15, "column": 84