UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,419 lines (1,418 loc) 1.29 MB
{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "chai_1", "range": [ 18, 24 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 10 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 27, 34 ], "loc": { "start": { "line": 2, "column": 13 }, "end": { "line": 2, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "chai", "raw": "'chai'", "range": [ 35, 41 ], "loc": { "start": { "line": 2, "column": 21 }, "end": { "line": 2, "column": 27 } } } ], "range": [ 27, 42 ], "loc": { "start": { "line": 2, "column": 13 }, "end": { "line": 2, "column": 28 } } }, "range": [ 18, 42 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 28 } } } ], "kind": "var", "range": [ 14, 43 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 29 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Rx", "range": [ 48, 50 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 6 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 53, 60 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 16 } } }, "arguments": [ { "type": "Literal", "value": "../../dist/cjs/Rx", "raw": "'../../dist/cjs/Rx'", "range": [ 61, 80 ], "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 36 } } } ], "range": [ 53, 81 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 37 } } }, "range": [ 48, 81 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 37 } } } ], "kind": "var", "range": [ 44, 82 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "ReplaySubject", "range": [ 87, 100 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 17 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 103, 105 ], "loc": { "start": { "line": 4, "column": 20 }, "end": { "line": 4, "column": 22 } } }, "property": { "type": "Identifier", "name": "ReplaySubject", "range": [ 106, 119 ], "loc": { "start": { "line": 4, "column": 23 }, "end": { "line": 4, "column": 36 } } }, "range": [ 103, 119 ], "loc": { "start": { "line": 4, "column": 20 }, "end": { "line": 4, "column": 36 } } }, "range": [ 87, 119 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 36 } } } ], "kind": "var", "range": [ 83, 120 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 37 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Observable", "range": [ 125, 135 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 14 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 138, 140 ], "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 19 } } }, "property": { "type": "Identifier", "name": "Observable", "range": [ 141, 151 ], "loc": { "start": { "line": 5, "column": 20 }, "end": { "line": 5, "column": 30 } } }, "range": [ 138, 151 ], "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 30 } } }, "range": [ 125, 151 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 30 } } } ], "kind": "var", "range": [ 121, 152 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 31 } }, "trailingComments": [ { "type": "Block", "value": "* @test {ReplaySubject} ", "range": [ 153, 181 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 28 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 182, 190 ], "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "ReplaySubject", "raw": "'ReplaySubject'", "range": [ 191, 206 ], "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 24 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 226, 228 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should extend Subject", "raw": "'should extend Subject'", "range": [ 229, 252 ], "loc": { "start": { "line": 8, "column": 7 }, "end": { "line": 8, "column": 30 } } }, { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "done", "range": [ 264, 268 ], "loc": { "start": { "line": 8, "column": 42 }, "end": { "line": 8, "column": 46 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "subject", "range": [ 284, 291 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 19 } } }, "init": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "ReplaySubject", "range": [ 298, 311 ], "loc": { "start": { "line": 9, "column": 26 }, "end": { "line": 9, "column": 39 } } }, "arguments": [], "range": [ 294, 313 ], "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 9, "column": 41 } } }, "range": [ 284, 313 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 41 } } } ], "kind": "var", "range": [ 280, 314 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 42 } } }, { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "chai_1", "range": [ 323, 329 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 14 } } }, "property": { "type": "Identifier", "name": "expect", "range": [ 330, 336 ], "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 10, "column": 21 } } }, "range": [ 323, 336 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 21 } } }, "arguments": [ { "type": "BinaryExpression", "operator": "instanceof", "left": { "type": "Identifier", "name": "subject", "range": [ 337, 344 ], "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 29 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 356, 358 ], "loc": { "start": { "line": 10, "column": 41 }, "end": { "line": 10, "column": 43 } } }, "property": { "type": "Identifier", "name": "Subject", "range": [ 359, 366 ], "loc": { "start": { "line": 10, "column": 44 }, "end": { "line": 10, "column": 51 } } }, "range": [ 356, 366 ], "loc": { "start": { "line": 10, "column": 41 }, "end": { "line": 10, "column": 51 } } }, "range": [ 337, 366 ], "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 51 } } } ], "range": [ 323, 367 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 52 } } }, "property": { "type": "Identifier", "name": "to", "range": [ 368, 370 ], "loc": { "start": { "line": 10, "column": 53 }, "end": { "line": 10, "column": 55 } } }, "range": [ 323, 370 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 55 } } }, "property": { "type": "Identifier", "name": "be", "range": [ 371, 373 ], "loc": { "start": { "line": 10, "column": 56 }, "end": { "line": 10, "column": 58 } } }, "range": [ 323, 373 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 58 } } }, "property": { "type": "Identifier", "name": "true", "range": [ 374, 378 ], "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 10, "column": 63 } } }, "range": [ 323, 378 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 63 } } }, "range": [ 323, 379 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 64 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "done", "range": [ 388, 392 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } } }, "arguments": [], "range": [ 388, 394 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 14 } } }, "range": [ 388, 395 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 15 } } } ], "range": [ 270, 401 ], "loc": { "start": { "line": 8, "column": 48 }, "end": { "line": 12, "column": 5 } } }, "generator": false, "expression": false, "range": [ 254, 401 ], "loc": { "start": { "line": 8, "column": 32 }, "end": { "line": 12, "column": 5 } } } ], "range": [ 226, 402 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 12, "column": 6 } }, "_esdocTestId": 2439, "_esdocTestName": "it2439" }, "range": [ 226, 403 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 12, "column": 7 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 408, 410 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should add the observer before running subscription code", "raw": "'should add the observer before running subscription code'", "range": [ 411, 469 ], "loc": { "start": { "line": 13, "column": 7 }, "end": { "line": 13, "column": 65 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "subject", "range": [ 497, 504 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 19 } } }, "init": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "ReplaySubject", "range": [ 511, 524 ], "loc": { "start": { "line": 14, "column": 26 }, "end": { "line": 14, "column": 39 } } }, "arguments": [], "range": [ 507, 526 ], "loc": { "start": { "line": 14, "column": 22 }, "end": { "line": 14, "column": 41 } } }, "range": [ 497, 526 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 41 } } } ], "kind": "var", "range": [ 493, 527 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 42 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "subject", "range": [ 536, 543 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 15 } } }, "property": { "type": "Identifier", "name": "next", "range": [ 544, 548 ], "loc": { "start": { "line": 15, "column": 16 }, "end": { "line": 15, "column": 20 } } }, "range": [ 536, 548 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": 1, "raw": "1", "range": [ 549, 550 ], "loc": { "start": { "line": 15, "column": 21 }, "end": { "line": 15, "column": 22 } } } ], "range": [ 536, 551 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 23 } } }, "range": [ 536, 552 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 24 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "results", "range": [ 565, 572 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 19 } } }, "init": { "type": "ArrayExpression", "elements": [], "range": [ 575, 577 ], "loc": { "start": { "line": 16, "column": 22 }, "end": { "line": 16, "column": 24 } } }, "range": [ 565, 577 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 24 } }