UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,355 lines (1,354 loc) 433 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 } } } ], "kind": "var", "range": [ 83, 114 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 31 } }, "trailingComments": [ { "type": "Block", "value": "* @test {defer} ", "range": [ 115, 135 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 20 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 136, 144 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.defer", "raw": "'Observable.defer'", "range": [ 145, 163 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 27 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 183, 192 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "defer(() => Observable.of(a, b, c))", "raw": "'defer(() => Observable.of(a, b, c))'", "range": [ 193, 230 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 51 } } } ], "range": [ 183, 231 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 52 } } }, "arguments": [ { "type": "Literal", "value": "should defer the creation of a simple Observable", "raw": "'should defer the creation of a simple Observable'", "range": [ 232, 282 ], "loc": { "start": { "line": 7, "column": 53 }, "end": { "line": 7, "column": 103 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 310, 318 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 20 } } }, "init": { "type": "Literal", "value": "-a--b--c--|", "raw": "'-a--b--c--|'", "range": [ 321, 334 ], "loc": { "start": { "line": 8, "column": 23 }, "end": { "line": 8, "column": 36 } } }, "range": [ 310, 334 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 36 } } } ], "kind": "var", "range": [ 306, 335 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 37 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 348, 350 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Observable", "range": [ 353, 363 ], "loc": { "start": { "line": 9, "column": 17 }, "end": { "line": 9, "column": 27 } } }, "property": { "type": "Identifier", "name": "defer", "range": [ 364, 369 ], "loc": { "start": { "line": 9, "column": 28 }, "end": { "line": 9, "column": 33 } } }, "range": [ 353, 369 ], "loc": { "start": { "line": 9, "column": 17 }, "end": { "line": 9, "column": 33 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 391, 395 ], "loc": { "start": { "line": 9, "column": 55 }, "end": { "line": 9, "column": 59 } } }, "arguments": [ { "type": "Literal", "value": "-a--b--c--|", "raw": "'-a--b--c--|'", "range": [ 396, 409 ], "loc": { "start": { "line": 9, "column": 60 }, "end": { "line": 9, "column": 73 } } } ], "range": [ 391, 410 ], "loc": { "start": { "line": 9, "column": 55 }, "end": { "line": 9, "column": 74 } } }, "range": [ 384, 411 ], "loc": { "start": { "line": 9, "column": 48 }, "end": { "line": 9, "column": 75 } } } ], "range": [ 382, 413 ], "loc": { "start": { "line": 9, "column": 46 }, "end": { "line": 9, "column": 77 } } }, "generator": false, "expression": false, "range": [ 370, 413 ], "loc": { "start": { "line": 9, "column": 34 }, "end": { "line": 9, "column": 77 } } } ], "range": [ 353, 414 ], "loc": { "start": { "line": 9, "column": 17 }, "end": { "line": 9, "column": 78 } } }, "range": [ 348, 414 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 78 } } } ], "kind": "var", "range": [ 344, 415 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 79 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 424, 440 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "e1", "range": [ 441, 443 ], "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 27 } } } ], "range": [ 424, 444 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 28 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 445, 449 ], "loc": { "start": { "line": 10, "column": 29 }, "end": { "line": 10, "column": 33 } } }, "range": [ 424, 449 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 33 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 450, 458 ], "loc": { "start": { "line": 10, "column": 34 }, "end": { "line": 10, "column": 42 } } } ], "range": [ 424, 459 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 43 } } }, "range": [ 424, 460 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 44 } } } ], "range": [ 296, 466 ], "loc": { "start": { "line": 7, "column": 117 }, "end": { "line": 11, "column": 5 } } }, "generator": false, "expression": false, "range": [ 284, 466 ], "loc": { "start": { "line": 7, "column": 105 }, "end": { "line": 11, "column": 5 } } } ], "range": [ 183, 467 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 11, "column": 6 } } }, "range": [ 183, 468 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 11, "column": 7 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 473, 475 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should create an observable from the provided observable factory", "raw": "'should create an observable from the provided observable factory'", "range": [ 476, 542 ], "loc": { "start": { "line": 12, "column": 7 }, "end": { "line": 12, "column": 73 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source", "range": [ 570, 576 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 579, 582 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 24 } } }, "arguments": [ { "type": "Literal", "value": "--a--b--c--|", "raw": "'--a--b--c--|'", "range": [ 583, 597 ], "loc": { "start": { "line": 13, "column": 25 }, "end": { "line": 13, "column": 39 } } } ], "range": [ 579, 598 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 40 } } }, "range": [ 570, 598 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 40 } } } ], "kind": "var", "range": [ 566, 599 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 41 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "sourceSubs", "range": [ 612, 622 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 22 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 625, 639 ], "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 39 } } }, "range": [ 612, 639 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 39 } } } ], "kind": "var", "range": [ 608, 640 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 40 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 653, 661 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 20 } } }, "init": { "type": "Literal", "value": "--a--b--c--|", "raw": "'--a--b--c--|'", "range": [ 664, 678 ], "loc": { "start": { "line": 15, "column": 23 }, "end": { "line": 15, "column": 37 } } }, "range": [ 653, 678 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 37 } } } ], "kind": "var", "range": [ 649, 679 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15,