UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,280 lines 151 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Subject", "range": [ 9, 16 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 16 } } }, "imported": { "type": "Identifier", "name": "Subject", "range": [ 9, 16 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 16 } } }, "range": [ 9, 16 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 16 } } } ], "source": { "type": "Literal", "value": "./Subject", "raw": "'./Subject'", "range": [ 24, 35 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 35 } } }, "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Subscription", "range": [ 46, 58 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 21 } } }, "imported": { "type": "Identifier", "name": "Subscription", "range": [ 46, 58 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 21 } } }, "range": [ 46, 58 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 21 } } } ], "source": { "type": "Literal", "value": "./Subscription", "raw": "'./Subscription'", "range": [ 66, 82 ], "loc": { "start": { "line": 2, "column": 29 }, "end": { "line": 2, "column": 45 } } }, "range": [ 37, 83 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 46 } }, "trailingComments": [ { "type": "Block", "value": "*\n * @class AsyncSubject<T>\n ", "range": [ 84, 117 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 5, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "AsyncSubject", "range": [ 129, 141 ], "loc": { "start": { "line": 6, "column": 11 }, "end": { "line": 6, "column": 23 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "_super", "range": [ 155, 161 ], "loc": { "start": { "line": 6, "column": 37 }, "end": { "line": 6, "column": 43 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "__extends", "range": [ 169, 178 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 13 } } }, "arguments": [ { "type": "Identifier", "name": "AsyncSubject", "range": [ 179, 191 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 26 } } }, { "type": "Identifier", "name": "_super", "range": [ 193, 199 ], "loc": { "start": { "line": 7, "column": 28 }, "end": { "line": 7, "column": 34 } } } ], "range": [ 169, 200 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 35 } } }, "range": [ 169, 201 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 36 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "AsyncSubject", "range": [ 215, 227 ], "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 25 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "_super", "range": [ 240, 246 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 14 } } }, "property": { "type": "Identifier", "name": "apply", "range": [ 247, 252 ], "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 9, "column": 20 } } }, "range": [ 240, 252 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 20 } } }, "arguments": [ { "type": "ThisExpression", "range": [ 253, 257 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 25 } } }, { "type": "Identifier", "name": "arguments", "range": [ 259, 268 ], "loc": { "start": { "line": 9, "column": 27 }, "end": { "line": 9, "column": 36 } } } ], "range": [ 240, 269 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 37 } } }, "range": [ 240, 270 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 38 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 279, 283 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "property": { "type": "Identifier", "name": "value", "range": [ 284, 289 ], "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 18 } } }, "range": [ 279, 289 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 18 } } }, "right": { "type": "Literal", "value": null, "raw": "null", "range": [ 292, 296 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 25 } } }, "range": [ 279, 296 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 25 } } }, "range": [ 279, 297 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 26 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 306, 310 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } } }, "property": { "type": "Identifier", "name": "hasNext", "range": [ 311, 318 ], "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 20 } } }, "range": [ 306, 318 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 20 } } }, "right": { "type": "Literal", "value": false, "raw": "false", "range": [ 321, 326 ], "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 28 } } }, "range": [ 306, 326 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 28 } } }, "range": [ 306, 327 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 29 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 336, 340 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "name": "hasCompleted", "range": [ 341, 353 ], "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 25 } } }, "range": [ 336, 353 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 25 } } }, "right": { "type": "Literal", "value": false, "raw": "false", "range": [ 356, 361 ], "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 33 } } }, "range": [ 336, 361 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 33 } } }, "range": [ 336, 362 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 34 } } } ], "range": [ 230, 368 ], "loc": { "start": { "line": 8, "column": 28 }, "end": { "line": 13, "column": 5 } } }, "generator": false, "expression": false, "range": [ 206, 368 ], "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": "AsyncSubject", "range": [ 373, 385 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 16 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 386, 395 ], "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 14, "column": 26 } } }, "range": [ 373, 395 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 26 } } }, "property": { "type": "Identifier", "name": "_subscribe", "range": [ 396, 406 ], "loc": { "start": { "line": 14, "column": 27 }, "end": { "line": 14, "column": 37 } } }, "range": [ 373, 406 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 37 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "subscriber", "range": [ 419, 429 ], "loc": { "start": { "line": 14, "column": 50 }, "end": { "line": 14, "column": 60 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "LogicalExpression", "operator": "&&", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 445, 449 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 16 } } }, "property": { "type": "Identifier", "name": "hasCompleted", "range": [ 450, 462 ], "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 29 } } }, "range": [ 445, 462 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 29 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 466, 470 ], "loc": { "start": { "line": 15, "column": 33 }, "end": { "line": 15, "column": 37 } } }, "property": { "type": "Identifier", "name": "hasNext", "range": [ 471, 478 ], "loc": { "start": { "line": 15, "column": 38 }, "end": { "line": 15, "column": 45 } } }, "range": [ 466, 478 ], "loc": { "start": { "line": 15, "column": 33 }, "end": { "line": 15, "column": 45 } } }, "range": [ 445, 478 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 45 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "subscriber", "range": [ 494, 504 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 22 } } }, "property": { "type": "Identifier", "name": "next", "range": [ 505, 509 ], "loc": { "start": { "line": 16, "column": 23 }, "end": { "line": 16, "column": 27 } } }, "range": [ 494, 509 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 27 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 510, 514 ], "loc": { "start": { "line": 16, "column": 28 }, "end": { "line": 16, "column": 32 } } }, "property": { "type": "Identifier", "name": "value", "range": [ 515, 520 ], "loc": { "start": { "line": 16, "column": 33 }, "end": { "line": 16, "column": 38 } } }, "range": [ 510, 520 ], "loc": { "start": { "line": 16, "column": 28 }, "end": { "line": 16, "column": 38 } } } ], "range": [ 494, 521 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 39 } } }, "range": [ 494, 522 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 40 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "subscriber", "range": [ 535, 545 ], "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 22 } } }, "property": { "type": "Identifier", "name": "complete", "range": [ 546, 554 ], "loc": { "start": { "line": 17, "