@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,762 lines (1,761 loc) • 68.5 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "ArrayObservable",
"range": [
9,
24
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 24
}
}
},
"imported": {
"type": "Identifier",
"name": "ArrayObservable",
"range": [
9,
24
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 24
}
}
},
"range": [
9,
24
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 24
}
}
}
],
"source": {
"type": "Literal",
"value": "../observable/ArrayObservable",
"raw": "'../observable/ArrayObservable'",
"range": [
32,
63
],
"loc": {
"start": {
"line": 1,
"column": 32
},
"end": {
"line": 1,
"column": 63
}
}
},
"range": [
0,
64
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 64
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "ScalarObservable",
"range": [
74,
90
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 25
}
}
},
"imported": {
"type": "Identifier",
"name": "ScalarObservable",
"range": [
74,
90
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 25
}
}
},
"range": [
74,
90
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 25
}
}
}
],
"source": {
"type": "Literal",
"value": "../observable/ScalarObservable",
"raw": "'../observable/ScalarObservable'",
"range": [
98,
130
],
"loc": {
"start": {
"line": 2,
"column": 33
},
"end": {
"line": 2,
"column": 65
}
}
},
"range": [
65,
131
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 66
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "EmptyObservable",
"range": [
141,
156
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 24
}
}
},
"imported": {
"type": "Identifier",
"name": "EmptyObservable",
"range": [
141,
156
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 24
}
}
},
"range": [
141,
156
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 24
}
}
}
],
"source": {
"type": "Literal",
"value": "../observable/EmptyObservable",
"raw": "'../observable/EmptyObservable'",
"range": [
164,
195
],
"loc": {
"start": {
"line": 3,
"column": 32
},
"end": {
"line": 3,
"column": 63
}
}
},
"range": [
132,
196
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 64
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "concatStatic",
"range": [
206,
218
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 21
}
}
},
"imported": {
"type": "Identifier",
"name": "concatStatic",
"range": [
206,
218
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 21
}
}
},
"range": [
206,
218
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 21
}
}
}
],
"source": {
"type": "Literal",
"value": "./concat",
"raw": "'./concat'",
"range": [
226,
236
],
"loc": {
"start": {
"line": 4,
"column": 29
},
"end": {
"line": 4,
"column": 39
}
}
},
"range": [
197,
237
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 40
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "isScheduler",
"range": [
247,
258
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 20
}
}
},
"imported": {
"type": "Identifier",
"name": "isScheduler",
"range": [
247,
258
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 20
}
}
},
"range": [
247,
258
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 20
}
}
}
],
"source": {
"type": "Literal",
"value": "../util/isScheduler",
"raw": "'../util/isScheduler'",
"range": [
266,
287
],
"loc": {
"start": {
"line": 5,
"column": 28
},
"end": {
"line": 5,
"column": 49
}
}
},
"range": [
238,
288
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 50
}
},
"trailingComments": [
{
"type": "Block",
"value": " tslint:disable:max-line-length ",
"range": [
289,
325
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 36
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "startWith",
"range": [
342,
351
],
"loc": {
"start": {
"line": 7,
"column": 16
},
"end": {
"line": 7,
"column": 25
}
}
},
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "array",
"range": [
364,
369
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 13
}
}
},
"init": {
"type": "ArrayExpression",
"elements": [],
"range": [
372,
374
],
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 18
}
}
},
"range": [
364,
374
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 18
}
}
}
],
"kind": "var",
"range": [
360,
375
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 19
}
}
},
{
"type": "ForStatement",
"init": {
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "_i",
"range": [
389,
391
],
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 15
}
}
},
"init": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
394,
395
],
"loc": {
"start": {
"line": 9,
"column": 18
},
"end": {
"line": 9,
"column": 19
}
}
},
"range": [
389,
395
],
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 19
}
}
}
],
"kind": "var",
"range": [
385,
395
],
"loc": {
"start": {
"line": 9,
"column": 9
},
"end": {
"line": 9,
"column": 19
}
}
},
"test": {
"type": "BinaryExpression",
"operator": "<",
"left": {
"type": "Identifier",
"name": "_i",
"range": [
397,
399
],
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 23
}
}
},
"right": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "arguments",
"range": [
402,
411
],
"loc": {
"start": {
"line": 9,
"column": 26
},
"end": {
"line": 9,
"column": 35
}
}
},
"property": {
"type": "Identifier",
"name": "length",
"range": [
412,
418
],
"loc": {
"start": {
"line": 9,
"column": 36
},
"end": {
"line": 9,
"column": 42
}
}
},
"range": [
402,
418
],
"loc": {
"start": {
"line": 9,
"column": 26
},
"end": {
"line": 9,
"column": 42
}
}
},
"range": [
397,
418
],
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 42
}
}
},
"update": {
"type": "UpdateExpression",
"operator": "++",
"argument": {
"type": "Identifier",
"name": "_i",
"range": [
420,
422
],
"loc": {
"start": {
"line": 9,
"column": 44
},
"end": {
"line": 9,
"column": 46
}
}
},
"prefix": false,
"range": [
420,
424
],
"loc": {
"start": {
"line": 9,
"column": 44
},
"end": {
"line": 9,
"column": 48
}
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": true,
"object": {
"type": "Identifier",
"name": "array",
"range": [
436,
441
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 13
}
}
},
"property": {
"type": "BinaryExpression",
"operator": "-",
"left": {
"type": "Identifier",
"name": "_i",
"range": [
442,
444
],
"loc": {
"start": {
"line": 10,
"column": 14
},
"end": {
"line": 10,
"column": 16
}
}
},
"right": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
447,
448
],
"loc": {
"start": {
"line": 10,
"column": 19
},
"end": {
"line": 10,
"column": 20
}
}
},
"range": [
442,
448
],
"loc": {
"start": {
"line": 10,
"column": 14
},
"end": {
"line": 10,
"column": 20
}
}
},
"range": [
436,
449
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 21
}
}
},
"right": {
"type": "MemberExpression",
"computed": true,
"object": {
"type": "Identifier",
"name": "arguments",
"range": [
452,
461
],
"loc": {
"start": {
"line": 10,
"column": 24
},
"end": {
"line": 10,
"column": 33
}
}
},
"property": {
"type": "Identifier",
"name": "_i",
"range": [
462,
464
],
"loc": {
"start": {
"line": 10,
"column": 34
},
"end": {
"line": 10,
"column": 36
}
}
},
"range": [
452,
465
],
"loc": {
"start": {
"line": 10,
"column": 24
},
"end": {
"line": 10,
"column": 37
}
}
},
"range": [
436,
465
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 37
}
}
},
"range": [
436,
466
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 38
}
}
}
],
"range": [
426,
472
],
"loc": {
"start": {
"line": 9,
"column": 50
},
"end": {
"line": 11,
"column": 5
}
}
},
"range": [
380,
472
],
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 11,
"column": 5
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "scheduler",
"range": [
481,
490
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 17
}
}
},
"init": {
"type": "MemberExpression",
"computed": true,
"object": {
"type": "Identifier",
"name": "array",
"range": [
493,
498
],
"loc": {
"start": {
"line": 12,
"column": 20
},
"end": {
"line": 12,
"column": 25
}
}
},
"property": {
"type": "BinaryExpression",
"operator": "-",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "array",
"range": [
499,
504
],
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 31
}
}
},
"property": {
"type": "Identifier",
"name": "length",
"range": [
505,
511
],
"loc": {
"start": {
"line": 12,
"column": 32
},
"end": {
"line": 12,
"column": 38
}
}
},
"range": [
499,
511
],
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 38
}
}
},
"right": {
"type": "Literal",
"value": 1,
"raw": "1",
"range": [
514,
515
],
"loc": {
"start": {
"line": 12,
"column": 41
},
"end": {
"line": 12,
"column": 42
}
}
},
"range": [
499,
515
],
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 42
}
}
},
"range": [
493,
516
],
"loc": {
"start": {
"line": 12,
"column": 20
},
"end": {
"line": 12,
"column": 43
}
}
},
"range": [
481,
516
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 43
}
}
}
],
"kind": "var",
"range": [
477,
517
],
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 44
}
}
},
{
"type": "IfStatement",
"test": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isScheduler",
"range": [
526,
537
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 19
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "scheduler",
"range": [
538,
547
],
"loc": {
"start": {
"line": 13,
"column": 20
},
"end": {
"line": 13,
"column": 29
}
}
}
],
"range": [
526,
548
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 30
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "array",
"range": [
560,
565
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 13
}
}
},
"property": {
"type": "Identifier",
"name": "pop",
"range": [
566,
569
],
"loc": {
"start": {
"line": 14,
"column": 14
},
"end": {
"line": 14,
"column": 17
}
}
},
"range": [
560,
569
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 17
}
}
},
"arguments": [],
"range": [
560,
571
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 19
}
}
},
"range": [
560,
572
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 20
}
}
}
],
"range": [
550,
578
],
"loc": {
"start": {
"line": 13,
"column": 32
},
"end": {
"line": 15,
"column": 5
}
}
},
"alternate": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "scheduler",
"range": [
598,
607
],
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 17
}
}
},
"right": {
"type": "Literal",
"value": null,
"raw": "null",
"range": [
610,
614
],
"loc": {
"start": {
"line": 17,
"column": 20
},
"end": {
"line": 17,
"column": 24
}
}
},
"range": [
598,
614
],
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 24
}
}
},
"range": [
598,
615
],
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 25
}
}
}
],
"range": [
588,
621
],
"loc": {
"start": {
"line": 16,
"column": 9
},
"end": {
"line": 18,
"column": 5
}
}
},
"range": [
522,
621
],
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 18,
"column": 5
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "len",
"range": [
630,
633
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 11
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "array",
"range": [
636,
641
],
"loc": {
"start": {
"line": 19,
"column": 14
},
"end": {
"line": 19,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "length",
"range": [
642,
648
],
"loc": {
"start": {
"line": 19,
"column": 20
},
"end": {
"line": 19,
"column": 26
}
}
},
"range": [
636,
648
],
"loc": {
"start": {
"line": 19,
"column": 14
},
"end": {
"line": 19,
"column": 26
}
}
},
"range": [
630,
648
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 26
}
}
}
],
"kind": "var",
"range": [
626,
649
],
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 27
}
}
},
{
"type": "IfStatement",
"test": {
"type": "BinaryExpression",
"operator": "===",
"left": {
"type": "Identifier",
"name": "len",
"range": [
658,
661
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 11
}
}
},
"right": {
"type": "Literal",
"value": 1,
"raw": "1",
"range": [
666,
667
],
"loc": {
"start": {
"line": 20,
"column": 16
},
"end": {
"line": 20,
"column": 17
}
}
},
"range": [
658,
667
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 17
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "concatStatic",
"range": [
686,
698
],
"loc": {
"start": {
"line": 21,
"column": 15
},
"end": {
"line": 21,
"column": 27
}
}
},
"arguments": [
{
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ScalarObservable",
"range": [
703,
719
],
"loc": {
"start": {
"line": 21,
"column": 32
},
"end": {
"line": 21,
"column": 48
}
}
},
"arguments": [
{
"type": "MemberExpression",
"computed": true,
"object": {
"type": "Identifier",
"name": "array",
"range": [
720,
725
],
"loc": {
"start": {
"line": 21,
"column": 49
},
"end": {
"line": 21,
"column": 54
}
}
},
"property": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
726,
727
],
"loc": {
"start": {
"line": 21,
"column": 55
},
"end": {
"line": 21,
"column": 56
}
}
},
"range": [
720,
728
],
"loc": {
"start": {
"line": 21,
"column": 49
},
"end": {
"line": 21,
"column": 57
}
}
},
{
"type": "Identifier",
"name": "scheduler",
"range": [
730,
739
],
"loc": {
"start": {
"line": 21,
"column": 59
},
"end": {
"line": 21,
"column": 68
}
}
}
],
"range": [
699,
740
],
"loc": {
"start": {
"line": 21,
"column": 28
},
"end": {
"line": 21,
"column": 69
}
}
},
{
"type": "ThisExpression",
"range": [
742,
746
],
"loc": {
"start": {
"line": 21,
"column": 71
},
"end": {