UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,319 lines (1,318 loc) 134 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": "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": "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 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "UnsubscriptionError", "range": [ 115, 134 ], "loc": { "start": { "line": 4, "column": 32 }, "end": { "line": 4, "column": 51 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 137, 139 ], "loc": { "start": { "line": 4, "column": 54 }, "end": { "line": 4, "column": 56 } } }, "property": { "type": "Identifier", "name": "UnsubscriptionError", "range": [ 140, 159 ], "loc": { "start": { "line": 4, "column": 57 }, "end": { "line": 4, "column": 76 } } }, "range": [ 137, 159 ], "loc": { "start": { "line": 4, "column": 54 }, "end": { "line": 4, "column": 76 } } }, "range": [ 115, 159 ], "loc": { "start": { "line": 4, "column": 32 }, "end": { "line": 4, "column": 76 } } } ], "kind": "var", "range": [ 83, 160 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 77 } }, "trailingComments": [ { "type": "Block", "value": "* @test {UnsubscriptionError} ", "range": [ 161, 195 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 34 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 196, 204 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "UnsubscriptionError", "raw": "'UnsubscriptionError'", "range": [ 205, 226 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 30 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 246, 248 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should create a message that is a clear indication of its internal errors", "raw": "'should create a message that is a clear indication of its internal errors'", "range": [ 249, 324 ], "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 82 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "err1", "range": [ 352, 356 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 16 } } }, "init": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "Error", "range": [ 363, 368 ], "loc": { "start": { "line": 8, "column": 23 }, "end": { "line": 8, "column": 28 } } }, "arguments": [ { "type": "Literal", "value": "Swiss cheese tastes amazing but smells like socks", "raw": "'Swiss cheese tastes amazing but smells like socks'", "range": [ 369, 420 ], "loc": { "start": { "line": 8, "column": 29 }, "end": { "line": 8, "column": 80 } } } ], "range": [ 359, 421 ], "loc": { "start": { "line": 8, "column": 19 }, "end": { "line": 8, "column": 81 } } }, "range": [ 352, 421 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 81 } } } ], "kind": "var", "range": [ 348, 422 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 82 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "err2", "range": [ 435, 439 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 16 } } }, "init": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "Error", "range": [ 446, 451 ], "loc": { "start": { "line": 9, "column": 23 }, "end": { "line": 9, "column": 28 } } }, "arguments": [ { "type": "Literal", "value": "User too big to fit in tiny European elevator", "raw": "'User too big to fit in tiny European elevator'", "range": [ 452, 499 ], "loc": { "start": { "line": 9, "column": 29 }, "end": { "line": 9, "column": 76 } } } ], "range": [ 442, 500 ], "loc": { "start": { "line": 9, "column": 19 }, "end": { "line": 9, "column": 77 } } }, "range": [ 435, 500 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 77 } } } ], "kind": "var", "range": [ 431, 501 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 78 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source1", "range": [ 514, 521 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 19 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Observable", "range": [ 524, 534 ], "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 32 } } }, "property": { "type": "Identifier", "name": "create", "range": [ 535, 541 ], "loc": { "start": { "line": 10, "column": 33 }, "end": { "line": 10, "column": 39 } } }, "range": [ 524, 541 ], "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 39 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ThrowStatement", "argument": { "type": "Identifier", "name": "err1", "range": [ 583, 587 ], "loc": { "start": { "line": 10, "column": 81 }, "end": { "line": 10, "column": 85 } } }, "range": [ 577, 588 ], "loc": { "start": { "line": 10, "column": 75 }, "end": { "line": 10, "column": 86 } } } ], "range": [ 575, 590 ], "loc": { "start": { "line": 10, "column": 73 }, "end": { "line": 10, "column": 88 } } }, "generator": false, "expression": false, "range": [ 563, 590 ], "loc": { "start": { "line": 10, "column": 61 }, "end": { "line": 10, "column": 88 } } }, "range": [ 556, 591 ], "loc": { "start": { "line": 10, "column": 54 }, "end": { "line": 10, "column": 89 } } } ], "range": [ 554, 593 ], "loc": { "start": { "line": 10, "column": 52 }, "end": { "line": 10, "column": 91 } } }, "generator": false, "expression": false, "range": [ 542, 593 ], "loc": { "start": { "line": 10, "column": 40 }, "end": { "line": 10, "column": 91 } } } ], "range": [ 524, 594 ], "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 92 } } }, "range": [ 514, 594 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 92 } } } ], "kind": "var", "range": [ 510, 595 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 93 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source2", "range": [ 608, 615 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 19 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Observable", "range": [ 618, 628 ], "loc": { "start": { "line": 11, "column": 22 }, "end": { "line": 11, "column": 32 } } }, "property": { "type": "Identifier", "name": "timer", "range": [ 629, 634 ], "loc": { "start": { "line": 11, "column": 33 }, "end": { "line": 11, "column": 38 } } }, "range": [ 618, 634 ], "loc": { "start": { "line": 11, "column": 22 }, "end": { "line": 11, "column": 38 } } }, "arguments": [ { "type": "Literal", "value": 1000, "raw": "1000", "range": [ 635, 639 ], "loc": { "start": { "line": 11, "column": 39 }, "end": { "line": 11, "column": 43 } } } ], "range": [ 618, 640 ], "loc": { "start": { "line": 11, "column": 22 }, "end": { "line": 11, "column": 44 } } }, "range": [ 608, 640 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 44 } } } ], "kind": "var", "range": [ 604, 641 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 45 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source3", "range": [ 654, 661 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 19 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Observable", "range": [ 664, 674 ], "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 32 } } }, "property": { "type": "Identifier", "name": "create", "range": [ 675, 681 ], "loc": { "start": { "line": 12, "column": 33 }, "end": { "line": 12, "column": 39 } } }, "range": [ 664, 681 ], "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 39 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ThrowStatement", "argument": { "type": "Identifier", "name": "err2", "range": [ 723, 727 ], "loc": { "start": { "line": 12, "column": 81 }, "end": { "line": 12,