UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,296 lines 575 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": "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 {debounceTime} ", "range": [ 85, 112 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 27 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 113, 121 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.debounceTime", "raw": "'Observable.prototype.debounceTime'", "range": [ 122, 157 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 44 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 177, 186 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "debounceTime(20)", "raw": "'debounceTime(20)'", "range": [ 187, 205 ], "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 32 } } } ], "range": [ 177, 206 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 33 } } }, "arguments": [ { "type": "Literal", "value": "should debounce values by 20 time units", "raw": "'should debounce values by 20 time units'", "range": [ 207, 248 ], "loc": { "start": { "line": 6, "column": 34 }, "end": { "line": 6, "column": 75 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 276, 278 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 281, 284 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "-a--bc--d---|", "raw": "'-a--bc--d---|'", "range": [ 285, 300 ], "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 36 } } } ], "range": [ 281, 301 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 37 } } }, "range": [ 276, 301 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 37 } } } ], "kind": "var", "range": [ 272, 302 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 315, 323 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 20 } } }, "init": { "type": "Literal", "value": "---a---c--d-|", "raw": "'---a---c--d-|'", "range": [ 326, 341 ], "loc": { "start": { "line": 8, "column": 23 }, "end": { "line": 8, "column": 38 } } }, "range": [ 315, 341 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 38 } } } ], "kind": "var", "range": [ 311, 342 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 39 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 351, 367 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 24 } } }, "arguments": [ { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 368, 370 ], "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 27 } } }, "property": { "type": "Identifier", "name": "debounceTime", "range": [ 371, 383 ], "loc": { "start": { "line": 9, "column": 28 }, "end": { "line": 9, "column": 40 } } }, "range": [ 368, 383 ], "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 40 } } }, "arguments": [ { "type": "Literal", "value": 20, "raw": "20", "range": [ 384, 386 ], "loc": { "start": { "line": 9, "column": 41 }, "end": { "line": 9, "column": 43 } } }, { "type": "Identifier", "name": "rxTestScheduler", "range": [ 388, 403 ], "loc": { "start": { "line": 9, "column": 45 }, "end": { "line": 9, "column": 60 } } } ], "range": [ 368, 404 ], "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 61 } } } ], "range": [ 351, 405 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 62 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 406, 410 ], "loc": { "start": { "line": 9, "column": 63 }, "end": { "line": 9, "column": 67 } } }, "range": [ 351, 410 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 67 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 411, 419 ], "loc": { "start": { "line": 9, "column": 68 }, "end": { "line": 9, "column": 76 } } } ], "range": [ 351, 420 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 77 } } }, "range": [ 351, 421 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 78 } } } ], "range": [ 262, 427 ], "loc": { "start": { "line": 6, "column": 89 }, "end": { "line": 10, "column": 5 } } }, "generator": false, "expression": false, "range": [ 250, 427 ], "loc": { "start": { "line": 6, "column": 77 }, "end": { "line": 10, "column": 5 } } } ], "range": [ 177, 428 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 10, "column": 6 } } }, "range": [ 177, 429 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 10, "column": 7 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 434, 436 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should delay all element by the specified time", "raw": "'should delay all element by the specified time'", "range": [ 437, 485 ], "loc": { "start": { "line": 11, "column": 7 }, "end": { "line": 11, "column": 55 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 513, 515 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 518, 521 ], "loc": { "start": { "line": 12, "column": 17 }, "end": { "line": 12, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "-a--------b------c----|", "raw": "'-a--------b------c----|'", "range": [ 522, 547 ], "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 46 } } } ], "range": [ 518, 548 ], "loc": { "start": { "line": 12, "column": 17 }, "end": { "line": 12, "column": 47 } } }, "range": [ 513, 548 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 47 } } } ], "kind": "var", "range": [ 509, 549 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 48 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1subs", "range": [ 562, 568 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 18 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 571, 596 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 46 } } }, "range": [ 562, 596 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 46 } } } ], "kind": "var", "range": [ 558, 597 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 47 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 610, 618 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 20 } } }, "init": { "type": "Literal", "value": "------a--------b------(c|)", "raw": "'------a--------b------(c|)'", "range": [ 621, 649 ], "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 51 } } }, "range": [ 610, 649 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 51 } } } ], "kind": "var", "range": [ 606, 650 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 52 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 659, 675 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 24 } } }, "arguments": [ { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 676, 678 ], "loc": { "start": { "line": 15, "column": 25 }, "end": { "line": 15, "column": 27 } } }, "property": { "type": "Identifier", "name": "debounceTime", "range": [ 679, 691 ], "loc": { "start": { "line": 15, "column": 28 }, "end": { "line": 15, "column": 40 } } }, "range": [ 676, 691 ], "loc": { "start": { "line": 15, "column": 25 }, "end": { "line": 15, "column": 40 } } }, "arguments": [ { "type": "Li