UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,594 lines (1,593 loc) 105 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Subscriber", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, "imported": { "type": "Identifier", "name": "Subscriber", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } } ], "source": { "type": "Literal", "value": "../Subscriber", "raw": "'../Subscriber'", "range": [ 27, 42 ], "loc": { "start": { "line": 1, "column": 27 }, "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": "async", "range": [ 53, 58 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 14 } } }, "imported": { "type": "Identifier", "name": "async", "range": [ 53, 58 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 14 } } }, "range": [ 53, 58 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 14 } } } ], "source": { "type": "Literal", "value": "../scheduler/async", "raw": "'../scheduler/async'", "range": [ 66, 86 ], "loc": { "start": { "line": 2, "column": 22 }, "end": { "line": 2, "column": 42 } } }, "range": [ 44, 87 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 43 } }, "trailingComments": [ { "type": "Block", "value": "*\n * @param scheduler\n * @return {Observable<Timestamp<any>>|WebSocketSubject<T>|Observable<T>}\n * @method timestamp\n * @owner Observable\n ", "range": [ 88, 231 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "timestamp", "range": [ 248, 257 ], "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 25 } } }, "params": [ { "type": "Identifier", "name": "scheduler", "range": [ 258, 267 ], "loc": { "start": { "line": 9, "column": 26 }, "end": { "line": 9, "column": 35 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "scheduler", "range": [ 279, 288 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 17 } } }, "right": { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Literal", "value": 0, "raw": "0", "range": [ 298, 299 ], "loc": { "start": { "line": 10, "column": 27 }, "end": { "line": 10, "column": 28 } } }, "prefix": true, "range": [ 293, 299 ], "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 28 } } }, "range": [ 279, 299 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 28 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "scheduler", "range": [ 303, 312 ], "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 41 } } }, "right": { "type": "Identifier", "name": "async", "range": [ 315, 320 ], "loc": { "start": { "line": 10, "column": 44 }, "end": { "line": 10, "column": 49 } } }, "range": [ 303, 320 ], "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 49 } } }, "range": [ 303, 321 ], "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 50 } } } ], "range": [ 301, 323 ], "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 52 } } }, "alternate": null, "range": [ 275, 323 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 52 } } }, { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 335, 339 ], "loc": { "start": { "line": 11, "column": 11 }, "end": { "line": 11, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 340, 344 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 20 } } }, "range": [ 335, 344 ], "loc": { "start": { "line": 11, "column": 11 }, "end": { "line": 11, "column": 20 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "TimestampOperator", "range": [ 349, 366 ], "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 42 } } }, "arguments": [ { "type": "Identifier", "name": "scheduler", "range": [ 367, 376 ], "loc": { "start": { "line": 11, "column": 43 }, "end": { "line": 11, "column": 52 } } } ], "range": [ 345, 377 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 53 } } } ], "range": [ 335, 378 ], "loc": { "start": { "line": 11, "column": 11 }, "end": { "line": 11, "column": 54 } } }, "range": [ 328, 379 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 55 } } } ], "range": [ 269, 381 ], "loc": { "start": { "line": 9, "column": 37 }, "end": { "line": 12, "column": 1 } } }, "generator": false, "expression": false, "range": [ 239, 381 ], "loc": { "start": { "line": 9, "column": 7 }, "end": { "line": 12, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": "*\n * @param scheduler\n * @return {Observable<Timestamp<any>>|WebSocketSubject<T>|Observable<T>}\n * @method timestamp\n * @owner Observable\n ", "range": [ 88, 231 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "column": 3 } } } ], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 232, 381 ], "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 12, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": "*\n * @param scheduler\n * @return {Observable<Timestamp<any>>|WebSocketSubject<T>|Observable<T>}\n * @method timestamp\n * @owner Observable\n ", "range": [ 88, 231 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Timestamp", "range": [ 393, 402 ], "loc": { "start": { "line": 13, "column": 11 }, "end": { "line": 13, "column": 20 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "Timestamp", "range": [ 433, 442 ], "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 22 } } }, "params": [ { "type": "Identifier", "name": "value", "range": [ 443, 448 ], "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 28 } } }, { "type": "Identifier", "name": "timestamp", "range": [ 450, 459 ], "loc": { "start": { "line": 14, "column": 30 }, "end": { "line": 14, "column": 39 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 471, 475 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 12 } } }, "property": { "type": "Identifier", "name": "value", "range": [ 476, 481 ], "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 18 } } }, "range": [ 471, 481 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 18 } } }, "right": { "type": "Identifier", "name": "value", "range": [ 484, 489 ], "loc": { "start": { "line": 15, "column": 21 }, "end": { "line": 15, "column": 26 } } }, "range": [ 471, 489 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 26 } } }, "range": [ 471, 490 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 27 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 499, 503 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "name": "timestamp", "range": [ 504, 513 ], "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 22 } } }, "range": [ 499, 513 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 22 } } }, "right": { "type": "Identifier", "name": "timestamp", "range": [ 516, 525 ], "loc": { "start": { "line": 16, "column": 25 }, "end": { "line": 16, "column": 34 } } }, "range": [ 499, 525 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 34 } } }, "range": [ 499, 526 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 35 } } } ], "range": [ 461, 532 ], "loc": { "start": { "line": 14, "column": 41 }, "end": { "line": 17, "column": 5 } } }, "generator": false, "expression": false, "range": [ 424, 532 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 17, "column": 5 } } }, { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "Timestamp", "range": [ 544, 553 ], "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 20 } } }, "range": [ 537, 554 ], "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 21 } } } ], "range": [ 418, 556 ], "loc": { "start": { "line": 13, "column": 36 }, "end": { "line": 19, "column": 1 } } }, "generator": false, "expression": false, "range": [ 406, 556 ], "loc": { "start": { "line": 13, "column": 24 }, "end": { "line": 19, "column": 1 } } }, "arguments": [], "range": [ 406, 558 ], "loc": { "start": { "line": 13, "column": 24 }, "end": { "line": 19, "column": 3 } } }, "range": [ 393, 559 ], "loc": { "start": { "line": 13, "column": 11 }, "end": { "line": 19, "column": 4 } } } ], "kind": "var", "range": [ 389, 560 ], "loc": { "start": { "line": 13, "column": 7 }, "end": { "line": 19, "column": 5 } }, "leadingComments": [], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 382, 560 ], "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 19, "column": 5 } } }, { "type": "EmptyStatement", "range": [ 561, 562 ], "loc": { "start": { "line": 20, "column": 0 }, "end": { "line": 20, "column": 1 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "TimestampOperator", "range": [ 567, 584 ], "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 21 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "TimestampOperator", "range": [ 615, 632 ], "loc": { "start": { "line": 22, "column": 13 }, "end": { "line": 22, "column": 30 } } }, "params": [ { "type": "Identifier", "name": "scheduler", "range": [ 633, 642 ], "loc": { "start": { "line": 22, "column": 31 }, "end": { "line": 22, "column": 40 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 654, 658 ], "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 12 } } }, "property": { "type": "Identifier", "name": "scheduler", "range": [ 659, 668 ], "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 22 } } }, "range": [ 654, 668 ], "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 22 } } }, "right": { "type": "Identifier", "name": "scheduler", "range": [ 671, 680 ], "loc": { "start": { "line": 23, "column": 25 }, "end": { "line": 23, "column": 34 } } }, "range": [ 654, 680 ], "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 34 } } }, "range": [ 654, 681 ], "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 35 } } } ], "range": [ 644, 687 ], "loc": { "start": { "line": 22, "column": 42 }, "end": { "line": 24, "column": 5 } } }, "generator": false, "expression": false, "range": [ 606, 687 ], "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 24, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "TimestampOperator", "range": [ 692, 709 ], "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 21 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 710, 719 ], "loc": { "start": { "line": 25, "column": 22 }, "end": { "line": 25, "column": 31 } } }, "range": [ 692, 719 ], "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 31 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 720, 724 ], "loc": { "start": { "line": 25, "column": 32 }, "end": { "line": 25, "column": 36 } } }, "range": [ 692, 724 ], "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 36 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "observer", "range": [ 737, 745 ], "loc": { "start": { "line": 25, "column": 49 }, "end": { "line": 25, "column": 57 } } }, { "type": "Identifier", "name": "source", "range": [ 747, 753 ], "loc": { "start": { "line": 25, "column": 59 }, "end": { "line": 25, "column": 65 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 772, 778 ], "loc": { "start": { "line": 26, "column": 15 }, "end": { "line": 26, "column": 21 } } }, "property": { "type": "Identifier", "name": "_subscribe", "range": [ 779, 789 ], "loc": { "start": { "line": 26, "column": 22 }, "end": { "line": 26, "column": 32 } } }, "range": [ 772, 789 ], "loc": { "start": { "line": 26, "column": 15 }, "end": { "line": 26, "column": 32 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "TimestampSubscriber", "range": [ 794, 813 ], "loc": { "start": { "line": 26, "column": 37 }, "end": { "line": 26, "column": 56 } } }, "arguments": [ {