@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,236 lines (1,235 loc) • 214 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Observable",
"range": [
9,
19
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 19
}
}
},
"imported": {
"type": "Identifier",
"name": "Observable",
"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": "../Observable",
"raw": "'../Observable'",
"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
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n ",
"range": [
44,
138
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 6,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "RangeObservable",
"range": [
150,
165
],
"loc": {
"start": {
"line": 7,
"column": 11
},
"end": {
"line": 7,
"column": 26
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "_super",
"range": [
179,
185
],
"loc": {
"start": {
"line": 7,
"column": 40
},
"end": {
"line": 7,
"column": 46
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "__extends",
"range": [
193,
202
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 13
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "RangeObservable",
"range": [
203,
218
],
"loc": {
"start": {
"line": 8,
"column": 14
},
"end": {
"line": 8,
"column": 29
}
}
},
{
"type": "Identifier",
"name": "_super",
"range": [
220,
226
],
"loc": {
"start": {
"line": 8,
"column": 31
},
"end": {
"line": 8,
"column": 37
}
}
}
],
"range": [
193,
227
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 38
}
}
},
"range": [
193,
228
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 39
}
}
},
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "RangeObservable",
"range": [
242,
257
],
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 28
}
}
},
"params": [
{
"type": "Identifier",
"name": "start",
"range": [
258,
263
],
"loc": {
"start": {
"line": 9,
"column": 29
},
"end": {
"line": 9,
"column": 34
}
}
},
{
"type": "Identifier",
"name": "count",
"range": [
265,
270
],
"loc": {
"start": {
"line": 9,
"column": 36
},
"end": {
"line": 9,
"column": 41
}
}
},
{
"type": "Identifier",
"name": "scheduler",
"range": [
272,
281
],
"loc": {
"start": {
"line": 9,
"column": 43
},
"end": {
"line": 9,
"column": 52
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "_super",
"range": [
293,
299
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 14
}
}
},
"property": {
"type": "Identifier",
"name": "call",
"range": [
300,
304
],
"loc": {
"start": {
"line": 10,
"column": 15
},
"end": {
"line": 10,
"column": 19
}
}
},
"range": [
293,
304
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 19
}
}
},
"arguments": [
{
"type": "ThisExpression",
"range": [
305,
309
],
"loc": {
"start": {
"line": 10,
"column": 20
},
"end": {
"line": 10,
"column": 24
}
}
}
],
"range": [
293,
310
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 25
}
}
},
"range": [
293,
311
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 26
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
320,
324
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "start",
"range": [
325,
330
],
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 18
}
}
},
"range": [
320,
330
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 18
}
}
},
"right": {
"type": "Identifier",
"name": "start",
"range": [
333,
338
],
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 26
}
}
},
"range": [
320,
338
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 26
}
}
},
"range": [
320,
339
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 27
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
348,
352
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "_count",
"range": [
353,
359
],
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 19
}
}
},
"range": [
348,
359
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 19
}
}
},
"right": {
"type": "Identifier",
"name": "count",
"range": [
362,
367
],
"loc": {
"start": {
"line": 12,
"column": 22
},
"end": {
"line": 12,
"column": 27
}
}
},
"range": [
348,
367
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 27
}
}
},
"range": [
348,
368
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 28
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
377,
381
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "scheduler",
"range": [
382,
391
],
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 22
}
}
},
"range": [
377,
391
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 22
}
}
},
"right": {
"type": "Identifier",
"name": "scheduler",
"range": [
394,
403
],
"loc": {
"start": {
"line": 13,
"column": 25
},
"end": {
"line": 13,
"column": 34
}
}
},
"range": [
377,
403
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 34
}
}
},
"range": [
377,
404
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 35
}
}
}
],
"range": [
283,
410
],
"loc": {
"start": {
"line": 9,
"column": 54
},
"end": {
"line": 14,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
233,
410
],
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 14,
"column": 5
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * Creates an Observable that emits a sequence of numbers within a specified\n * range.\n *\n * <span class=\"informal\">Emits a sequence of numbers in a range.</span>\n *\n * <img src=\"./img/range.png\" width=\"100%\">\n *\n * `range` operator emits a range of sequential integers, in order, where you\n * select the `start` of the range and its `length`. By default, uses no\n * Scheduler and just delivers the notifications synchronously, but may use\n * an optional Scheduler to regulate those deliveries.\n *\n * @example <caption>Emits the numbers 1 to 10</caption>\n * var numbers = Rx.Observable.range(1, 10);\n * numbers.subscribe(x => console.log(x));\n *\n * @see {@link timer}\n * @see {@link interval}\n *\n * @param {number} [start=0] The value of the first integer in the sequence.\n * @param {number} [count=0] The number of sequential integers to generate.\n * @param {Scheduler} [scheduler] A {@link Scheduler} to use for scheduling\n * the emissions of the notifications.\n * @return {Observable} An Observable of numbers that emits a finite range of\n * sequential integers.\n * @static true\n * @name range\n * @owner Observable\n ",
"range": [
415,
1656
],
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 44,
"column": 7
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "RangeObservable",
"range": [
1661,
1676
],
"loc": {
"start": {
"line": 45,
"column": 4
},
"end": {
"line": 45,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "create",
"range": [
1677,
1683
],
"loc": {
"start": {
"line": 45,
"column": 20
},
"end": {
"line": 45,
"column": 26
}
}
},
"range": [
1661,
1683
],
"loc": {
"start": {
"line": 45,
"column": 4
},
"end": {
"line": 45,
"column": 26
}
}
},
"right": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "start",
"range": [
1696,
1701
],
"loc": {
"start": {
"line": 45,
"column": 39
},
"end": {
"line": 45,
"column": 44
}
}
},
{
"type": "Identifier",
"name": "count",
"range": [
1703,
1708
],
"loc": {
"start": {
"line": 45,
"column": 46
},
"end": {
"line": 45,
"column": 51
}
}
},
{
"type": "Identifier",
"name": "scheduler",
"range": [
1710,
1719
],
"loc": {
"start": {
"line": 45,
"column": 53
},
"end": {
"line": 45,
"column": 62
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "BinaryExpression",
"operator": "===",
"left": {
"type": "Identifier",
"name": "start",
"range": [
1735,
1740
],
"loc": {
"start": {
"line": 46,
"column": 12
},
"end": {
"line": 46,
"column": 17
}
}
},
"right": {
"type": "UnaryExpression",
"operator": "void",
"argument": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
1750,
1751
],
"loc": {
"start": {
"line": 46,
"column": 27
},
"end": {
"line": 46,
"column": 28
}
}
},
"prefix": true,
"range": [
1745,
1751
],
"loc": {
"start": {
"line": 46,
"column": 22
},
"end": {
"line": 46,
"column": 28
}
}
},
"range": [
1735,
1751
],
"loc": {
"start": {
"line": 46,
"column": 12
},
"end": {
"line": 46,
"column": 28
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "start",
"range": [
1755,
1760
],
"loc": {
"start": {
"line": 46,
"column": 32
},
"end": {
"line": 46,
"column": 37
}
}
},
"right": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
1763,
1764
],
"loc": {
"start": {
"line": 46,
"column": 40
},
"end": {
"line": 46,
"column": 41
}
}
},
"range": [
1755,
1764
],
"loc": {
"start": {
"line": 46,
"column": 32
},
"end": {
"line": 46,
"column": 41
}
}
},
"range": [
1755,
1765
],
"loc": {
"start": {
"line": 46,
"column": 32
},
"end": {
"line": 46,
"column": 42
}
}
}
],
"range": [
1753,
1767
],
"loc": {
"start": {
"line": 46,
"column": 30
},
"end": {
"line": 46,
"column": 44
}
}
},
"alternate": null,
"range": [
1731,
1767
],
"loc": {
"start": {
"line": 46,
"column": 8
},
"end": {
"line": 46,
"column": 44
}
}
},
{
"type": "IfStatement",
"test": {
"type": "BinaryExpression",
"operator": "===",
"left": {
"type": "Identifier",
"name": "count",
"range": [
1780,
1785
],
"loc": {
"start": {
"line": 47,
"column": 12
},
"end": {
"line": 47,
"column": 17
}
}
},
"right": {
"type": "UnaryExpression",
"operator": "void",
"argument": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
1795,
1796
],
"loc": {
"start": {
"line": 47,
"column": 27
},
"end": {
"line": 47,
"column": 28
}
}
},
"prefix": true,
"range": [
1790,
1796
],
"loc": {
"start": {
"line": 47,
"column": 22
},
"end": {
"line": 47,
"column": 28
}
}
},
"range": [
1780,
1796
],
"loc": {
"start": {
"line": 47,
"column": 12
},
"end": {
"line": 47,
"column": 28
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "count",
"range": [
1800,
1805
],
"loc": {
"start": {
"line": 47,
"column": 32
},
"end": {
"line": 47,
"column": 37
}
}
},
"right": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
1808,
1809
],
"loc": {
"start": {
"line": 47,
"column": 40
},
"end": {
"line": 47,