UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,206 lines (1,205 loc) 646 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 {finally} ", "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.finally", "raw": "'Observable.prototype.finally'", "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": "Identifier", "name": "it", "range": [ 197, 199 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should call finally after complete", "raw": "'should call finally after complete'", "range": [ 200, 236 ], "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 43 } } }, { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "done", "range": [ 248, 252 ], "loc": { "start": { "line": 7, "column": 55 }, "end": { "line": 7, "column": 59 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "completed", "range": [ 268, 277 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 21 } } }, "init": { "type": "Literal", "value": false, "raw": "false", "range": [ 280, 285 ], "loc": { "start": { "line": 8, "column": 24 }, "end": { "line": 8, "column": 29 } } }, "range": [ 268, 285 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 29 } } } ], "kind": "var", "range": [ 264, 286 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 30 } } }, { "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": "Identifier", "name": "Observable", "range": [ 295, 305 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 18 } } }, "property": { "type": "Identifier", "name": "of", "range": [ 306, 308 ], "loc": { "start": { "line": 9, "column": 19 }, "end": { "line": 9, "column": 21 } } }, "range": [ 295, 308 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": 1, "raw": "1", "range": [ 309, 310 ], "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 9, "column": 23 } } }, { "type": "Literal", "value": 2, "raw": "2", "range": [ 312, 313 ], "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 26 } } }, { "type": "Literal", "value": 3, "raw": "3", "range": [ 315, 316 ], "loc": { "start": { "line": 9, "column": 28 }, "end": { "line": 9, "column": 29 } } } ], "range": [ 295, 317 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 30 } } }, "property": { "type": "Identifier", "name": "finally", "range": [ 331, 338 ], "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 20 } } }, "range": [ 295, 338 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 10, "column": 20 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "chai_1", "range": [ 365, 371 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 18 } } }, "property": { "type": "Identifier", "name": "expect", "range": [ 372, 378 ], "loc": { "start": { "line": 11, "column": 19 }, "end": { "line": 11, "column": 25 } } }, "range": [ 365, 378 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 25 } } }, "arguments": [ { "type": "Identifier", "name": "completed", "range": [ 379, 388 ], "loc": { "start": { "line": 11, "column": 26 }, "end": { "line": 11, "column": 35 } } } ], "range": [ 365, 389 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 36 } } }, "property": { "type": "Identifier", "name": "to", "range": [ 390, 392 ], "loc": { "start": { "line": 11, "column": 37 }, "end": { "line": 11, "column": 39 } } }, "range": [ 365, 392 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 39 } } }, "property": { "type": "Identifier", "name": "be", "range": [ 393, 395 ], "loc": { "start": { "line": 11, "column": 40 }, "end": { "line": 11, "column": 42 } } }, "range": [ 365, 395 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 42 } } }, "property": { "type": "Identifier", "name": "true", "range": [ 396, 400 ], "loc": { "start": { "line": 11, "column": 43 }, "end": { "line": 11, "column": 47 } } }, "range": [ 365, 400 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 47 } } }, "range": [ 365, 401 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 48 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "done", "range": [ 414, 418 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 16 } } }, "arguments": [], "range": [ 414, 420 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 18 } } }, "range": [ 414, 421 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 19 } } } ], "range": [ 351, 431 ], "loc": { "start": { "line": 10, "column": 33 }, "end": { "line": 13, "column": 9 } } }, "generator": false, "expression": false, "range": [ 339, 431 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 13, "column": 9 } } } ], "range": [ 295, 432 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 13, "column": 10 } } }, "property": { "type": "Identifier", "name": "subscribe", "range": [ 446, 455 ], "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 22 } } }, "range": [ 295, 455 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 14, "column": 22 } } }, "arguments": [ { "type": "Literal", "value": null, "raw": "null", "range": [ 456, 460 ], "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 27 } } }, { "type": "Literal", "value": null, "raw": "null", "range": [ 462, 466 ], "loc": { "start": { "line": 14, "column": 29 }, "end": { "line": 14, "column": 33 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "completed", "range": [ 494, 503 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 21 } } }, "right": { "type": "Literal", "value": true, "raw": "true", "range": [ 506, 510 ], "loc": { "start": { "line": 15, "column": 24 }, "end": { "line": 15, "column": 28 } } }, "range": [ 494,