UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,298 lines (1,297 loc) 983 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 {exhaust} ", "range": [ 115, 137 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 22 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 138, 146 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.exhaust", "raw": "'Observable.prototype.exhaust'", "range": [ 147, 177 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 39 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 197, 206 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "exhaust", "raw": "'exhaust'", "range": [ 207, 216 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 23 } } } ], "range": [ 197, 217 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 24 } } }, "arguments": [ { "type": "Literal", "value": "should handle a hot observable of hot observables", "raw": "'should handle a hot observable of hot observables'", "range": [ 218, 269 ], "loc": { "start": { "line": 7, "column": 25 }, "end": { "line": 7, "column": 76 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 297, 298 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 301, 305 ], "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "--a---b---c--| ", "raw": "'--a---b---c--| '", "range": [ 306, 337 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 52 } } } ], "range": [ 301, 338 ], "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 53 } } }, "range": [ 297, 338 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 53 } } } ], "kind": "var", "range": [ 293, 339 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 54 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "y", "range": [ 352, 353 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 356, 360 ], "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "---d--e---f---| ", "raw": "'---d--e---f---| '", "range": [ 361, 384 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 44 } } } ], "range": [ 356, 385 ], "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 45 } } }, "range": [ 352, 385 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 45 } } } ], "kind": "var", "range": [ 348, 386 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 46 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "z", "range": [ 399, 400 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 403, 407 ], "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "---g--h---i---|", "raw": "'---g--h---i---|'", "range": [ 408, 425 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 38 } } } ], "range": [ 403, 426 ], "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 39 } } }, "range": [ 399, 426 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 39 } } } ], "kind": "var", "range": [ 395, 427 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 40 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 440, 442 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 445, 448 ], "loc": { "start": { "line": 11, "column": 17 }, "end": { "line": 11, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "------x-------y-----z-------------|", "raw": "'------x-------y-----z-------------|'", "range": [ 449, 486 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 58 } } }, { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 490, 491 ], "loc": { "start": { "line": 11, "column": 62 }, "end": { "line": 11, "column": 63 } } }, "value": { "type": "Identifier", "name": "x", "range": [ 493, 494 ], "loc": { "start": { "line": 11, "column": 65 }, "end": { "line": 11, "column": 66 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 490, 494 ], "loc": { "start": { "line": 11, "column": 62 }, "end": { "line": 11, "column": 66 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 496, 497 ], "loc": { "start": { "line": 11, "column": 68 }, "end": { "line": 11, "column": 69 } } }, "value": { "type": "Identifier", "name": "y", "range": [ 499, 500 ], "loc": { "start": { "line": 11, "column": 71 }, "end": { "line": 11, "column": 72 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 496, 500 ], "loc": { "start": { "line": 11, "column": 68 }, "end": { "line": 11, "column": 72 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "z", "range": [ 502, 503 ], "loc": { "start": { "line": 11, "column": 74 }, "end": { "line": 11, "column": 75 } } }, "value": { "type": "Identifier", "name": "z", "range": [ 505, 506 ], "loc": { "start": { "line": 11, "column": 77 }, "end": { "line": 11, "column": 78 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 502, 506 ], "loc": { "start": { "line": 11, "column": 74 }, "end": { "line": 11, "column": 78 } } } ], "range": [ 488, 508 ], "loc": { "start": { "line": 11, "column": 60 }, "end": { "line": 11, "column": 80 } } } ], "range": [ 445, 509 ], "loc": { "start": { "line": 11, "column": 17 }, "end": { "line": 11, "column": 81 } } }, "range": [ 440, 509 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 81 } } } ], "kind": "var", "range": [ 436, 510 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 82 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 523, 531 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 20 } } }, "init": { "type": "Literal", "value": "--------a---b---c------g--h---i---|", "raw": "'--------a---b---c------g--h---i---|'", "range": [ 534, 571 ], "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 60 } } }, "range": [ 523, 571 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 60 } } } ], "kind": "var", "range": [ 519, 572 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 61 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 581, 597 ], "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": [ 598, 600 ], "loc": { "start": { "line": 13, "column": 25 }, "end": { "line": 13, "column": 27 } } }, "property": { "type": "Identifier", "name": "exhaust", "range": [ 601, 608 ], "loc": { "start": { "line": 13, "column": 28 },