UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,435 lines (1,434 loc) 513 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "SubjectSubscriber", "range": [ 9, 26 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 26 } } }, "imported": { "type": "Identifier", "name": "SubjectSubscriber", "range": [ 9, 26 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 26 } } }, "range": [ 9, 26 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 26 } } } ], "source": { "type": "Literal", "value": "../Subject", "raw": "'../Subject'", "range": [ 34, 46 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 46 } } }, "range": [ 0, 47 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 47 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Observable", "range": [ 57, 67 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } }, "imported": { "type": "Identifier", "name": "Observable", "range": [ 57, 67 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } }, "range": [ 57, 67 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } } ], "source": { "type": "Literal", "value": "../Observable", "raw": "'../Observable'", "range": [ 75, 90 ], "loc": { "start": { "line": 2, "column": 27 }, "end": { "line": 2, "column": 42 } } }, "range": [ 48, 91 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 43 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Subscriber", "range": [ 101, 111 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 19 } } }, "imported": { "type": "Identifier", "name": "Subscriber", "range": [ 101, 111 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 19 } } }, "range": [ 101, 111 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 19 } } } ], "source": { "type": "Literal", "value": "../Subscriber", "raw": "'../Subscriber'", "range": [ 119, 134 ], "loc": { "start": { "line": 3, "column": 27 }, "end": { "line": 3, "column": 42 } } }, "range": [ 92, 135 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 43 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Subscription", "range": [ 145, 157 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 21 } } }, "imported": { "type": "Identifier", "name": "Subscription", "range": [ 145, 157 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 21 } } }, "range": [ 145, 157 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 21 } } } ], "source": { "type": "Literal", "value": "../Subscription", "raw": "'../Subscription'", "range": [ 165, 182 ], "loc": { "start": { "line": 4, "column": 29 }, "end": { "line": 4, "column": 46 } } }, "range": [ 136, 183 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 47 } }, "trailingComments": [ { "type": "Block", "value": "*\n * @class ConnectableObservable<T>\n ", "range": [ 184, 226 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 7, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "ConnectableObservable", "range": [ 238, 259 ], "loc": { "start": { "line": 8, "column": 11 }, "end": { "line": 8, "column": 32 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "_super", "range": [ 273, 279 ], "loc": { "start": { "line": 8, "column": 46 }, "end": { "line": 8, "column": 52 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "__extends", "range": [ 287, 296 ], "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 13 } } }, "arguments": [ { "type": "Identifier", "name": "ConnectableObservable", "range": [ 297, 318 ], "loc": { "start": { "line": 9, "column": 14 }, "end": { "line": 9, "column": 35 } } }, { "type": "Identifier", "name": "_super", "range": [ 320, 326 ], "loc": { "start": { "line": 9, "column": 37 }, "end": { "line": 9, "column": 43 } } } ], "range": [ 287, 327 ], "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 44 } } }, "range": [ 287, 328 ], "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 45 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "ConnectableObservable", "range": [ 342, 363 ], "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 34 } } }, "params": [ { "type": "Identifier", "name": "source", "range": [ 364, 370 ], "loc": { "start": { "line": 10, "column": 35 }, "end": { "line": 10, "column": 41 } } }, { "type": "Identifier", "name": "subjectFactory", "range": [ 372, 386 ], "loc": { "start": { "line": 10, "column": 43 }, "end": { "line": 10, "column": 57 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "_super", "range": [ 398, 404 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 14 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 405, 409 ], "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 11, "column": 19 } } }, "range": [ 398, 409 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 19 } } }, "arguments": [ { "type": "ThisExpression", "range": [ 410, 414 ], "loc": { "start": { "line": 11, "column": 20 }, "end": { "line": 11, "column": 24 } } } ], "range": [ 398, 415 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 25 } } }, "range": [ 398, 416 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 26 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 425, 429 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "name": "source", "range": [ 430, 436 ], "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 19 } } }, "range": [ 425, 436 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 19 } } }, "right": { "type": "Identifier", "name": "source", "range": [ 439, 445 ], "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 28 } } }, "range": [ 425, 445 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 28 } } }, "range": [ 425, 446 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 29 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 455, 459 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } }, "property": { "type": "Identifier", "name": "subjectFactory", "range": [ 460, 474 ], "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 27 } } }, "range": [ 455, 474 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 27 } } }, "right": { "type": "Identifier", "name": "subjectFactory", "range": [ 477, 491 ], "loc": { "start": { "line": 13, "column": 30 }, "end": { "line": 13, "column": 44 } } }, "range": [ 455, 491 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 44 } } }, "range": [ 455, 492 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 45 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 501, 505 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 12 } } }, "property": { "type": "Identifier", "name": "_refCount", "range": [ 506, 515 ], "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 22 } } }, "range": [ 501, 515 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 22 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 518, 519 ], "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 26 } } }, "range": [ 501, 519 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 26 } } }, "range": [ 501, 520 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 27 } } } ], "range": [ 388, 526 ], "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 15, "column": 5 } } }, "generator": false, "expression": false, "range": [ 333, 526 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 15, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "ConnectableObservable", "range": [ 531, 552 ], "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 25 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 553, 562 ], "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 35 } } }, "range": [ 531, 562 ], "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 35 } } }, "property": { "type": "Identifier", "name": "_subscribe", "range": [ 563, 573 ], "loc": { "start": { "line": 16, "column": 36 }, "end": { "line": 16, "column": 46 } } }, "range": [ 531, 573 ], "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 46 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "subscriber", "range": [ 586, 596 ], "loc": { "start": { "line": 16, "column": 59 }, "end": { "line": 16, "column": 69 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 615, 619 ], "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 19 } } }, "property": { "type": "Identifier", "name": "getSubject", "range": [ 620, 630 ], "loc": { "start": { "line": 17, "column": 20 }, "end": { "line": 17, "column": 30 } } }, "range": [ 615, 630 ], "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 30 } } }, "arguments": [], "range": [ 615, 632 ], "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 32 } } }, "property": { "type": "Identifier", "name": "subscribe", "range": [ 633, 642 ], "loc": { "start": { "line": 17, "column": 33 }, "end": { "line": 17, "column": 42 } } }, "range": [ 615, 642 ], "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 42 } } }, "arguments": [ { "type": "Identifier", "name": "subscriber", "range": [ 643, 653 ], "loc": { "start": { "line": 17, "column": 43 }, "end": { "line": 17, "column": 53 } } } ], "range": [ 615, 654 ], "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 54 } } }, "range": [ 608, 655 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 55 } } } ], "range": [ 598, 661 ], "loc": { "start": { "line": 16, "column": 71 }, "end": { "line": 18, "column": 5 } } }, "generator": false, "expression": false, "range": [ 576, 661 ], "loc": { "start": { "line": 16, "column": 49 }, "end": { "line": 18, "column": 5 } } }, "range": [ 531, 661 ], "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 18, "column": 5 } } }, "range": [ 531, 662 ], "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 18, "column": 6 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "ConnectableObservable", "range": [ 667, 688 ], "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 25 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 689, 698 ], "loc": { "start": { "line": 19,