UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,725 lines (1,724 loc) 613 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "async", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, "imported": { "type": "Identifier", "name": "async", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } } ], "source": { "type": "Literal", "value": "../scheduler/async", "raw": "'../scheduler/async'", "range": [ 22, 42 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 42 } } }, "range": [ 0, 43 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 43 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Subscriber", "range": [ 53, 63 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } }, "imported": { "type": "Identifier", "name": "Subscriber", "range": [ 53, 63 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } }, "range": [ 53, 63 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 19 } } } ], "source": { "type": "Literal", "value": "../Subscriber", "raw": "'../Subscriber'", "range": [ 71, 86 ], "loc": { "start": { "line": 2, "column": 27 }, "end": { "line": 2, "column": 42 } } }, "range": [ 44, 87 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 43 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "isScheduler", "range": [ 97, 108 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 20 } } }, "imported": { "type": "Identifier", "name": "isScheduler", "range": [ 97, 108 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 20 } } }, "range": [ 97, 108 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 20 } } } ], "source": { "type": "Literal", "value": "../util/isScheduler", "raw": "'../util/isScheduler'", "range": [ 116, 137 ], "loc": { "start": { "line": 3, "column": 28 }, "end": { "line": 3, "column": 49 } } }, "range": [ 88, 138 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 50 } }, "trailingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 139, 175 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 36 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "bufferTime", "range": [ 192, 202 ], "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 26 } } }, "params": [ { "type": "Identifier", "name": "bufferTimeSpan", "range": [ 203, 217 ], "loc": { "start": { "line": 5, "column": 27 }, "end": { "line": 5, "column": 41 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "length", "range": [ 229, 235 ], "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 14 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "arguments", "range": [ 238, 247 ], "loc": { "start": { "line": 6, "column": 17 }, "end": { "line": 6, "column": 26 } } }, "property": { "type": "Identifier", "name": "length", "range": [ 248, 254 ], "loc": { "start": { "line": 6, "column": 27 }, "end": { "line": 6, "column": 33 } } }, "range": [ 238, 254 ], "loc": { "start": { "line": 6, "column": 17 }, "end": { "line": 6, "column": 33 } } }, "range": [ 229, 254 ], "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 33 } } } ], "kind": "var", "range": [ 225, 255 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 34 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "scheduler", "range": [ 264, 273 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 17 } } }, "init": { "type": "Identifier", "name": "async", "range": [ 276, 281 ], "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 25 } } }, "range": [ 264, 281 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 25 } } } ], "kind": "var", "range": [ 260, 282 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 26 } } }, { "type": "IfStatement", "test": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "isScheduler", "range": [ 291, 302 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 19 } } }, "arguments": [ { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "arguments", "range": [ 303, 312 ], "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 29 } } }, "property": { "type": "BinaryExpression", "operator": "-", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "arguments", "range": [ 313, 322 ], "loc": { "start": { "line": 8, "column": 30 }, "end": { "line": 8, "column": 39 } } }, "property": { "type": "Identifier", "name": "length", "range": [ 323, 329 ], "loc": { "start": { "line": 8, "column": 40 }, "end": { "line": 8, "column": 46 } } }, "range": [ 313, 329 ], "loc": { "start": { "line": 8, "column": 30 }, "end": { "line": 8, "column": 46 } } }, "right": { "type": "Literal", "value": 1, "raw": "1", "range": [ 332, 333 ], "loc": { "start": { "line": 8, "column": 49 }, "end": { "line": 8, "column": 50 } } }, "range": [ 313, 333 ], "loc": { "start": { "line": 8, "column": 30 }, "end": { "line": 8, "column": 50 } } }, "range": [ 303, 334 ], "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 51 } } } ], "range": [ 291, 335 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 52 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "scheduler", "range": [ 347, 356 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 17 } } }, "right": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "arguments", "range": [ 359, 368 ], "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 29 } } }, "property": { "type": "BinaryExpression", "operator": "-", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "arguments", "range": [ 369, 378 ], "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 39 } } }, "property": { "type": "Identifier", "name": "length", "range": [ 379, 385 ], "loc": { "start": { "line": 9, "column": 40 }, "end": { "line": 9, "column": 46 } } }, "range": [ 369, 385 ], "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 46 } } }, "right": { "type": "Literal", "value": 1, "raw": "1", "range": [ 388, 389 ], "loc": { "start": { "line": 9, "column": 49 }, "end": { "line": 9, "column": 50 } } }, "range": [ 369, 389 ], "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 50 } } }, "range": [ 359, 390 ], "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 51 } } }, "range": [ 347, 390 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 51 } } }, "range": [ 347, 391 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 52 } } }, { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Identifier", "name": "length", "range": [ 400, 406 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 14 } } }, "prefix": false, "range": [ 400, 408 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 16 } } }, "range": [ 400, 409 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 17 } } } ], "range": [ 337, 415 ], "loc": { "start": { "line": 8, "column": 54 }, "end": { "line": 11, "column": 5 } } }, "alternate": null, "range": [ 287, 415 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 11, "column": 5 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "bufferCreationInterval", "range": [ 424, 446 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 30 } } }, "init": { "type": "Literal", "value": null, "raw": "null", "range": [ 449, 453 ], "loc": { "start": { "line": 12, "column": 33 }, "end": { "line": 12, "column": 37 } } }, "range": [ 424, 453 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 37 } } } ], "kind": "var", "range": [ 420, 454 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 38 } } }, { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": ">=", "left": { "type": "Identifier", "name": "length", "range": [ 463, 469 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 14 } } }, "right": { "type": "Literal", "value": 2, "raw": "2", "range": [ 473, 474 ], "loc": { "start": { "line": 13, "column": 18 }, "end": { "line": 13, "column": 19 } } }, "range": [ 463, 474 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 19 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "bufferCreationInterval", "range": [ 486, 508 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 30 } } }, "right": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "arguments", "range": [ 511, 520 ], "loc": { "start": { "line": 14, "column": 33 }, "end": { "line": 14, "column": 42 } } }, "property": { "type": "Literal", "value": 1, "raw": "1", "range": [ 521, 522 ], "loc": { "start": { "line": 14, "column": 43 }, "end": { "line": 14, "column": 44 } } }, "range": [ 511, 523 ], "loc": { "start": { "line": 14, "column": 33 }, "end": { "line": 14, "column": 45 } } }, "range": [ 486, 523 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 45 } } }, "range": [ 486, 524 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 46 } } } ], "range": [ 476, 530 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 15, "column": 5 } } }, "alternate": null, "range": [ 459, 530 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 15, "column": 5 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "maxBufferSize", "range": [ 539, 552 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 21 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Number", "range": [ 555, 561 ], "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 30 } } }, "property": { "type": "Identifier", "name": "POSITIVE_INFINITY", "range": [ 562, 579 ], "loc": { "start": { "line": 16, "column": 31 }, "end": { "line": 16, "column": 48 } } }, "range": [ 555, 579 ], "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 48 } } }, "range": [ 539, 579 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 48 } } } ], "kind": "var", "range": [ 535, 580 ], "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 49 } } }, { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": ">=", "left": { "type": "Identifier", "name": "length", "range": [ 589, 595 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 14 } } }, "right": { "type": "Literal", "value": 3, "raw": "3", "range": [ 599, 600 ], "loc": { "start": { "line": 17, "column": 18 }, "end": { "line": 17, "column": 19 } } }, "range": [ 589, 600 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 19 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "maxBufferSize", "range": [ 612, 625 ], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 21 } } }, "right": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "arguments", "range": [ 628, 637 ], "loc": { "start": { "line": 18, "column": 24 }, "end": { "line": 18, "column": 33 } } }, "property": { "type": "Literal", "value": 2, "raw": "2", "range": [ 638, 639 ], "loc": { "start": { "line": 18, "column": 34 }, "end": { "line": 18, "column": 35 } } }, "range": [ 628, 640 ], "loc": { "start": { "line": 18, "column": 24 }, "end": { "line": 18, "column": 36 } } }, "range": [ 612, 640 ], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 36 } } }, "range": [ 612, 641 ], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 37 } } } ], "range": [ 602, 647 ], "loc": { "start": { "line": 17, "column": 21 }, "end": { "line": 19, "column": 5 } } }, "alternate": null, "range": [ 585, 647 ], "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 19, "column": 5 } } }, { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 659, 663 ], "loc": { "start": { "line": 20, "column": 11 }, "end": { "line": 20, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 664, 668 ], "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 20, "column": 20 } } }, "range": [ 659, 668 ], "loc": { "start": { "line": 20, "column": 11 }, "end": { "line": 20, "column": 20 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "BufferTimeOperator", "range": [ 673, 691 ], "loc": { "start": { "line": 20, "column": 25 }, "end": { "line": 20, "column": 43 } } }, "arguments": [ { "type": "Identifier", "name": "bufferTimeSpan", "range": [ 692, 706 ], "loc": { "start": { "line": 20, "column": 44 }, "end": { "line": 20, "column": 58 } } }, { "type": "Identifier", "name": "bufferCreationInterval", "range": [ 708, 730 ], "loc": { "start": { "line": 20, "column": 60 }, "end": { "line": 20, "column": 82 } } }, { "type": "Identifier", "name": "maxBufferSize", "range": [ 732, 745 ], "loc": { "start": { "line": 20, "column": 84 }, "end": { "line": 20, "column": 97 } } }, { "type": "Identifier", "name": "scheduler", "range": [ 747, 756 ], "loc": { "start": { "line": 20, "column": 99 }, "end": { "line": 20, "column": 108 } } } ], "range": [ 669, 757 ], "loc": { "start": { "line": 20, "column": 21 }, "end": { "line": 20, "column": 109 } } } ], "range": [ 659, 758 ], "loc": { "start": { "line": 20, "column": 11 }, "end": { "line": 20, "column": 110 } } },