UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,329 lines 938 kB
{ "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": "Rx", "range": [ 18, 20 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 6 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 23, 30 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 16 } } }, "arguments": [ { "type": "Literal", "value": "../../dist/cjs/Rx", "raw": "'../../dist/cjs/Rx'", "range": [ 31, 50 ], "loc": { "start": { "line": 2, "column": 17 }, "end": { "line": 2, "column": 36 } } } ], "range": [ 23, 51 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 37 } } }, "range": [ 18, 51 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 37 } } } ], "kind": "var", "range": [ 14, 52 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "chai_1", "range": [ 57, 63 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 10 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 66, 73 ], "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "chai", "raw": "'chai'", "range": [ 74, 80 ], "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 27 } } } ], "range": [ 66, 81 ], "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 28 } } }, "range": [ 57, 81 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 28 } } } ], "kind": "var", "range": [ 53, 82 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 29 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Observable", "range": [ 87, 97 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 14 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 100, 102 ], "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 19 } } }, "property": { "type": "Identifier", "name": "Observable", "range": [ 103, 113 ], "loc": { "start": { "line": 4, "column": 20 }, "end": { "line": 4, "column": 30 } } }, "range": [ 100, 113 ], "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 30 } } }, "range": [ 87, 113 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 30 } } } ], "kind": "var", "range": [ 83, 114 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 31 } }, "trailingComments": [ { "type": "Block", "value": "* @test {sample} ", "range": [ 115, 136 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 21 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 137, 145 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.sample", "raw": "'Observable.prototype.sample'", "range": [ 146, 175 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 38 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 195, 204 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "sample", "raw": "'sample'", "range": [ 205, 213 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 22 } } } ], "range": [ 195, 214 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 23 } } }, "arguments": [ { "type": "Literal", "value": "should get samples when the notifier emits", "raw": "'should get samples when the notifier emits'", "range": [ 215, 259 ], "loc": { "start": { "line": 7, "column": 24 }, "end": { "line": 7, "column": 68 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 287, 289 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 292, 295 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "---a----b---c----------d-----| ", "raw": "'---a----b---c----------d-----| '", "range": [ 296, 331 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 56 } } } ], "range": [ 292, 332 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 57 } } }, "range": [ 287, 332 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 57 } } } ], "kind": "var", "range": [ 283, 333 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 58 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1subs", "range": [ 346, 352 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 18 } } }, "init": { "type": "Literal", "value": "^ ! ", "raw": "'^ ! '", "range": [ 355, 390 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 56 } } }, "range": [ 346, 390 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 56 } } } ], "kind": "var", "range": [ 342, 391 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 57 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e2", "range": [ 404, 406 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 409, 412 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "-----x----------x---x------x---|", "raw": "'-----x----------x---x------x---|'", "range": [ 413, 447 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 55 } } } ], "range": [ 409, 448 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 56 } } }, "range": [ 404, 448 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 56 } } } ], "kind": "var", "range": [ 400, 449 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 57 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e2subs", "range": [ 462, 468 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 18 } } }, "init": { "type": "Literal", "value": "^ ! ", "raw": "'^ ! '", "range": [ 471, 506 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 56 } } }, "range": [ 462, 506 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 56 } } } ], "kind": "var", "range": [ 458, 507 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 57 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 520, 528 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 20 } } }, "init": { "type": "Literal", "value": "-----a----------c----------d-| ", "raw": "'-----a----------c----------d-| '", "range": [ 531, 566 ], "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 58 } } }, "range": [ 520, 566 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 58 } } } ], "kind": "var", "range": [ 516, 567 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 59 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 576, 592 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 24 } } }, "arguments": [ { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 593, 595 ], "loc": { "start": { "line": 13, "column": 25 }, "end": { "line": 13, "column": 27 } } }, "property": { "type": "Identifier", "name": "sample", "range": [ 596, 602 ], "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 34 } } }, "range": [ 593, 602 ], "loc": { "start": { "line": 13, "column": 25 }, "end": { "line": 13, "column": 34 } } }, "arguments": [ { "type": "Identifier", "name": "e2", "range": [ 603, 605 ], "loc": { "start": { "line": 13, "column": 35 }, "end": { "line": 13, "column": 37 } } } ], "range": [ 593, 606 ], "loc": { "start": { "line": 13, "column": 25 }, "end": { "line": 13, "column": 38 } } } ], "range": [ 576, 607 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 39 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 608, 612 ], "loc": { "start": { "line": 13, "column": 40 }, "end": { "line": 13, "column": 44 } } }, "range": [ 576, 612 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 44 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 613, 621 ], "loc": { "start": { "line": 13, "column": 45 }, "end": { "line": 13, "column": 53 } } } ], "range": [ 576, 622 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 54 } } }, "range": [ 576, 623 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 55 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectSubscriptions", "range": [ 632, 651 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 27 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 652, 654 ], "loc": { "start": { "line": 14, "column": 28 }, "end": { "line": 14, "column": 30 } } }, "property": { "type": "Identifier", "name": "subscriptions", "range": [ 655, 668 ], "loc": { "start": { "line": 14, "column": 31 }, "end": { "line": 14, "column": 44 } } }, "range": [ 652, 668 ], "loc": { "start": { "line": 14, "column": 28 }, "end": { "line": 14, "column": 44 } } } ], "range": [ 632, 669 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 45 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 670, 674 ], "loc": { "start": { "line": 14, "column": 46 }, "end": { "line": 14, "column": 50 } } }, "range": [ 632, 674 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 50 } } }, "arguments": [ { "type": "Identifier", "name": "e1subs", "range": [ 675, 681 ], "loc": { "start":