UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,179 lines (1,178 loc) 90.1 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 } }, "trailingComments": [ { "type": "Block", "value": "* @test {let} ", "range": [ 83, 101 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 18 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 102, 110 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.let", "raw": "'Observable.prototype.let'", "range": [ 111, 137 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 35 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 157, 159 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should be able to compose with let", "raw": "'should be able to compose with let'", "range": [ 160, 196 ], "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 43 } } }, { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "done", "range": [ 208, 212 ], "loc": { "start": { "line": 6, "column": 55 }, "end": { "line": 6, "column": 59 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 228, 236 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 20 } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "aa", "raw": "'aa'", "range": [ 240, 244 ], "loc": { "start": { "line": 7, "column": 24 }, "end": { "line": 7, "column": 28 } } }, { "type": "Literal", "value": "bb", "raw": "'bb'", "range": [ 246, 250 ], "loc": { "start": { "line": 7, "column": 30 }, "end": { "line": 7, "column": 34 } } } ], "range": [ 239, 251 ], "loc": { "start": { "line": 7, "column": 23 }, "end": { "line": 7, "column": 35 } } }, "range": [ 228, 251 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 35 } } } ], "kind": "var", "range": [ 224, 252 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 36 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "i", "range": [ 265, 266 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 13 } } }, "init": { "type": "Literal", "value": 0, "raw": "0", "range": [ 269, 270 ], "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 17 } } }, "range": [ 265, 270 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 17 } } } ], "kind": "var", "range": [ 261, 271 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 18 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "foo", "range": [ 284, 287 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 15 } } }, "init": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "observable", "range": [ 300, 310 ], "loc": { "start": { "line": 9, "column": 28 }, "end": { "line": 9, "column": 38 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "observable", "range": [ 321, 331 ], "loc": { "start": { "line": 9, "column": 49 }, "end": { "line": 9, "column": 59 } } }, "property": { "type": "Identifier", "name": "map", "range": [ 332, 335 ], "loc": { "start": { "line": 9, "column": 60 }, "end": { "line": 9, "column": 63 } } }, "range": [ 321, 335 ], "loc": { "start": { "line": 9, "column": 49 }, "end": { "line": 9, "column": 63 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 346, 347 ], "loc": { "start": { "line": 9, "column": 74 }, "end": { "line": 9, "column": 75 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "x", "range": [ 358, 359 ], "loc": { "start": { "line": 9, "column": 86 }, "end": { "line": 9, "column": 87 } } }, "right": { "type": "Identifier", "name": "x", "range": [ 362, 363 ], "loc": { "start": { "line": 9, "column": 90 }, "end": { "line": 9, "column": 91 } } }, "range": [ 358, 363 ], "loc": { "start": { "line": 9, "column": 86 }, "end": { "line": 9, "column": 91 } } }, "range": [ 351, 364 ], "loc": { "start": { "line": 9, "column": 79 }, "end": { "line": 9, "column": 92 } } } ], "range": [ 349, 366 ], "loc": { "start": { "line": 9, "column": 77 }, "end": { "line": 9, "column": 94 } } }, "generator": false, "expression": false, "range": [ 336, 366 ], "loc": { "start": { "line": 9, "column": 64 }, "end": { "line": 9, "column": 94 } } } ], "range": [ 321, 367 ], "loc": { "start": { "line": 9, "column": 49 }, "end": { "line": 9, "column": 95 } } }, "range": [ 314, 368 ], "loc": { "start": { "line": 9, "column": 42 }, "end": { "line": 9, "column": 96 } } } ], "range": [ 312, 370 ], "loc": { "start": { "line": 9, "column": 40 }, "end": { "line": 9, "column": 98 } } }, "generator": false, "expression": false, "range": [ 290, 370 ], "loc": { "start": { "line": 9, "column": 18 }, "end": { "line": 9, "column": 98 } } }, "range": [ 284, 370 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 98 } } } ], "kind": "var", "range": [ 280, 371 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 99 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 380, 382 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 10 } } }, "property": { "type": "Identifier", "name": "Observable", "range": [ 383, 393 ], "loc": { "start": { "line": 10, "column": 11 }, "end": { "line": 10, "column": 21 } } }, "range": [ 380, 393 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 21 } } }, "property": { "type": "Identifier", "name": "from", "range": [ 407, 411 ], "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 17 } } }, "range": [ 380, 411 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 11, "column": 17 } } }, "arguments": [ { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "a", "raw": "'a'", "range": [ 413, 416 ], "loc": { "start": { "line": 11, "column": 19 }, "end": { "line": 11, "column": 22 } } }, { "type": "Literal", "value": "b", "raw": "'b'", "range": [ 418, 421 ], "loc": { "start": { "line": 11, "column": 24 }, "end": { "line": 11, "column": 27 } } } ], "range": [ 412, 422 ], "loc": { "start": { "line": 11, "column": 18 }, "end": { "line": 11, "column": 28 } } } ], "range": [ 380, 423 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 11, "column": 29 } } }, "property": { "type": "Identifier", "name": "let", "range": [ 437, 440 ], "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 16 } } }, "range": [ 380, 440 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 12, "column": 16 } } }, "arguments": [ { "type": "Identifier", "name": "foo", "range": [ 441, 444 ], "loc": { "start": { "line": 12, "column": 17 }, "end": { "line": 12, "column": 20 } } } ], "range": [ 380, 445 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 12, "column": 21 } } }, "property": { "type": "Identifier", "name": "subscribe", "range": [ 459, 468 ], "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13,