UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,220 lines 2.48 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": "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": "Observable", "range": [ 57, 67 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 14 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 70, 72 ], "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 19 } } }, "property": { "type": "Identifier", "name": "Observable", "range": [ 73, 83 ], "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 30 } } }, "range": [ 70, 83 ], "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 30 } } }, "range": [ 57, 83 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 30 } } } ], "kind": "var", "range": [ 53, 84 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 31 } }, "trailingComments": [ { "type": "Block", "value": "* @test {combineLatest} ", "range": [ 85, 113 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 28 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 114, 122 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.combineLatest", "raw": "'Observable.prototype.combineLatest'", "range": [ 123, 159 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 45 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 179, 188 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "combineLatest", "raw": "'combineLatest'", "range": [ 189, 204 ], "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 29 } } } ], "range": [ 179, 205 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 30 } } }, "arguments": [ { "type": "Literal", "value": "should combine events from two cold observables", "raw": "'should combine events from two cold observables'", "range": [ 206, 255 ], "loc": { "start": { "line": 6, "column": 31 }, "end": { "line": 6, "column": 80 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 283, 285 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 288, 292 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": "-a--b-----c-d-e-|", "raw": "'-a--b-----c-d-e-|'", "range": [ 293, 312 ], "loc": { "start": { "line": 7, "column": 22 }, "end": { "line": 7, "column": 41 } } } ], "range": [ 288, 313 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 42 } } }, "range": [ 283, 313 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 42 } } } ], "kind": "var", "range": [ 279, 314 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 43 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e2", "range": [ 327, 329 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 332, 336 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": "--1--2-3-4---| ", "raw": "'--1--2-3-4---| '", "range": [ 337, 356 ], "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 41 } } } ], "range": [ 332, 357 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 42 } } }, "range": [ 327, 357 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 42 } } } ], "kind": "var", "range": [ 323, 358 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 43 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 371, 379 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 20 } } }, "init": { "type": "Literal", "value": "--A-BC-D-EF-G-H-|", "raw": "'--A-BC-D-EF-G-H-|'", "range": [ 382, 401 ], "loc": { "start": { "line": 9, "column": 23 }, "end": { "line": 9, "column": 42 } } }, "range": [ 371, 401 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 42 } } } ], "kind": "var", "range": [ 367, 402 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 43 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 415, 421 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 424, 426 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 23 } } }, "property": { "type": "Identifier", "name": "combineLatest", "range": [ 427, 440 ], "loc": { "start": { "line": 10, "column": 24 }, "end": { "line": 10, "column": 37 } } }, "range": [ 424, 440 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 37 } } }, "arguments": [ { "type": "Identifier", "name": "e2", "range": [ 441, 443 ], "loc": { "start": { "line": 10, "column": 38 }, "end": { "line": 10, "column": 40 } } }, { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 455, 456 ], "loc": { "start": { "line": 10, "column": 52 }, "end": { "line": 10, "column": 53 } } }, { "type": "Identifier", "name": "b", "range": [ 458, 459 ], "loc": { "start": { "line": 10, "column": 55 }, "end": { "line": 10, "column": 56 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "BinaryExpression", "operator": "+", "left": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "String", "range": [ 470, 476 ], "loc": { "start": { "line": 10, "column": 67 }, "end": { "line": 10, "column": 73 } } }, "arguments": [ { "type": "Identifier", "name": "a", "range": [ 477, 478 ], "loc": { "start": { "line": 10, "column": 74 }, "end": { "line": 10, "column": 75 } } } ], "range": [ 470, 479 ], "loc": { "start": { "line": 10, "column": 67 }, "end": { "line": 10, "column": 76 } } }, "right": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "String", "range": [ 482, 488 ], "loc": { "start": { "line": 10, "column": 79 }, "end": { "line": 10, "column": 85 } } }, "arguments": [ { "type": "Identifier", "name": "b", "range": [ 489, 490 ], "loc": { "start": { "line": 10, "column": 86 }, "end": { "line": 10, "column": 87 } } } ], "range": [ 482, 491 ], "loc": { "start": { "line": 10, "column": 79 }, "end": { "line": 10, "column": 88 } } }, "range": [ 470, 491 ], "loc": { "start": { "line": 10, "column": 67 }, "end": { "line": 10, "column": 88 } } }, "range": [ 463, 492 ], "loc": { "start": { "line": 10, "column": 60 }, "end": { "line": 10, "column": 89 } } } ], "range": [ 461, 494 ], "loc": { "start": { "line": 10, "column": 58 }, "end": { "line": 10, "column": 91 } } }, "generator": false, "expression": false, "range": [ 445, 494 ], "loc": { "start": { "line": 10, "column": 42 }, "end": { "line": 10, "column": 91 } } } ], "range": [ 424, 495 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 92 } } }, "range": [ 415, 495 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 92 } } } ], "kind": "var", "range": [ 411, 496 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 93 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 505, 521 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "result", "range": [ 522, 528 ], "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 31 } } } ], "range": [ 505, 529 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 32 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 530, 534 ], "loc": { "start": { "line": 11, "column": 33 }, "end": { "line": 11, "column": 37 } } }, "range": [ 505, 534 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 37 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 535, 543 ], "loc": { "start": { "line": 11, "column": 38 }, "end": { "line": 11, "column": 46 } } }, { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "A", "range": [ 559, 560 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 13 } } }, "value": { "type": "Literal", "value": "a1", "raw": "'a