@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,543 lines (1,542 loc) • 265 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "OuterSubscriber",
"range": [
9,
24
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 24
}
}
},
"imported": {
"type": "Identifier",
"name": "OuterSubscriber",
"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": "../OuterSubscriber",
"raw": "'../OuterSubscriber'",
"range": [
32,
52
],
"loc": {
"start": {
"line": 1,
"column": 32
},
"end": {
"line": 1,
"column": 52
}
}
},
"range": [
0,
53
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 53
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "subscribeToResult",
"range": [
63,
80
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 26
}
}
},
"imported": {
"type": "Identifier",
"name": "subscribeToResult",
"range": [
63,
80
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 26
}
}
},
"range": [
63,
80
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 26
}
}
}
],
"source": {
"type": "Literal",
"value": "../util/subscribeToResult",
"raw": "'../util/subscribeToResult'",
"range": [
88,
115
],
"loc": {
"start": {
"line": 2,
"column": 34
},
"end": {
"line": 2,
"column": 61
}
}
},
"range": [
54,
116
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 62
}
},
"trailingComments": [
{
"type": "Block",
"value": " tslint:disable:max-line-length ",
"range": [
117,
153
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 36
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "switchMapTo",
"range": [
170,
181
],
"loc": {
"start": {
"line": 4,
"column": 16
},
"end": {
"line": 4,
"column": 27
}
}
},
"params": [
{
"type": "Identifier",
"name": "innerObservable",
"range": [
182,
197
],
"loc": {
"start": {
"line": 4,
"column": 28
},
"end": {
"line": 4,
"column": 43
}
}
},
{
"type": "Identifier",
"name": "resultSelector",
"range": [
199,
213
],
"loc": {
"start": {
"line": 4,
"column": 45
},
"end": {
"line": 4,
"column": 59
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
228,
232
],
"loc": {
"start": {
"line": 5,
"column": 11
},
"end": {
"line": 5,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"name": "lift",
"range": [
233,
237
],
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 20
}
}
},
"range": [
228,
237
],
"loc": {
"start": {
"line": 5,
"column": 11
},
"end": {
"line": 5,
"column": 20
}
}
},
"arguments": [
{
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "SwitchMapToOperator",
"range": [
242,
261
],
"loc": {
"start": {
"line": 5,
"column": 25
},
"end": {
"line": 5,
"column": 44
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "innerObservable",
"range": [
262,
277
],
"loc": {
"start": {
"line": 5,
"column": 45
},
"end": {
"line": 5,
"column": 60
}
}
},
{
"type": "Identifier",
"name": "resultSelector",
"range": [
279,
293
],
"loc": {
"start": {
"line": 5,
"column": 62
},
"end": {
"line": 5,
"column": 76
}
}
}
],
"range": [
238,
294
],
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 77
}
}
}
],
"range": [
228,
295
],
"loc": {
"start": {
"line": 5,
"column": 11
},
"end": {
"line": 5,
"column": 78
}
}
},
"range": [
221,
296
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 79
}
}
}
],
"range": [
215,
298
],
"loc": {
"start": {
"line": 4,
"column": 61
},
"end": {
"line": 6,
"column": 1
}
}
},
"generator": false,
"expression": false,
"range": [
161,
298
],
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 6,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": " tslint:disable:max-line-length ",
"range": [
117,
153
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 36
}
}
}
],
"trailingComments": []
},
"specifiers": [],
"source": null,
"range": [
154,
298
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 6,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": " tslint:disable:max-line-length ",
"range": [
117,
153
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 36
}
}
}
]
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "SwitchMapToOperator",
"range": [
303,
322
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 23
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "SwitchMapToOperator",
"range": [
353,
372
],
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 32
}
}
},
"params": [
{
"type": "Identifier",
"name": "observable",
"range": [
373,
383
],
"loc": {
"start": {
"line": 8,
"column": 33
},
"end": {
"line": 8,
"column": 43
}
}
},
{
"type": "Identifier",
"name": "resultSelector",
"range": [
385,
399
],
"loc": {
"start": {
"line": 8,
"column": 45
},
"end": {
"line": 8,
"column": 59
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
411,
415
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "observable",
"range": [
416,
426
],
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 23
}
}
},
"range": [
411,
426
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 23
}
}
},
"right": {
"type": "Identifier",
"name": "observable",
"range": [
429,
439
],
"loc": {
"start": {
"line": 9,
"column": 26
},
"end": {
"line": 9,
"column": 36
}
}
},
"range": [
411,
439
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 36
}
}
},
"range": [
411,
440
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 37
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
449,
453
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "resultSelector",
"range": [
454,
468
],
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 27
}
}
},
"range": [
449,
468
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 27
}
}
},
"right": {
"type": "Identifier",
"name": "resultSelector",
"range": [
471,
485
],
"loc": {
"start": {
"line": 10,
"column": 30
},
"end": {
"line": 10,
"column": 44
}
}
},
"range": [
449,
485
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 44
}
}
},
"range": [
449,
486
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 45
}
}
}
],
"range": [
401,
492
],
"loc": {
"start": {
"line": 8,
"column": 61
},
"end": {
"line": 11,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
344,
492
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 11,
"column": 5
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "SwitchMapToOperator",
"range": [
497,
516
],
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"name": "prototype",
"range": [
517,
526
],
"loc": {
"start": {
"line": 12,
"column": 24
},
"end": {
"line": 12,
"column": 33
}
}
},
"range": [
497,
526
],
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 33
}
}
},
"property": {
"type": "Identifier",
"name": "call",
"range": [
527,
531
],
"loc": {
"start": {
"line": 12,
"column": 34
},
"end": {
"line": 12,
"column": 38
}
}
},
"range": [
497,
531
],
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 38
}
}
},
"right": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "subscriber",
"range": [
544,
554
],
"loc": {
"start": {
"line": 12,
"column": 51
},
"end": {
"line": 12,
"column": 61
}
}
},
{
"type": "Identifier",
"name": "source",
"range": [
556,
562
],
"loc": {
"start": {
"line": 12,
"column": 63
},
"end": {
"line": 12,
"column": 69
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "source",
"range": [
581,
587
],
"loc": {
"start": {
"line": 13,
"column": 15
},
"end": {
"line": 13,
"column": 21
}
}
},
"property": {
"type": "Identifier",
"name": "_subscribe",
"range": [
588,
598
],
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"column": 32
}
}
},
"range": [
581,
598
],
"loc": {
"start": {
"line": 13,
"column": 15
},
"end": {
"line": 13,
"column": 32
}
}
},
"arguments": [
{
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "SwitchMapToSubscriber",
"range": [
603,
624
],
"loc": {
"start": {
"line": 13,
"column": 37
},
"end": {
"line": 13,
"column": 58
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "subscriber",
"range": [
625,
635
],
"loc": {
"start": {
"line": 13,
"column": 59
},
"end": {
"line": 13,
"column": 69
}
}
},
{
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
637,
641
],
"loc": {
"start": {
"line": 13,
"column": 71
},
"end": {
"line": 13,
"column": 75
}
}
},
"property": {
"type": "Identifier",
"name": "observable",
"range": [
642,
652
],
"loc": {
"start": {
"line": 13,
"column": 76
},
"end": {
"line": 13,
"column": 86
}
}
},
"range": [
637,
652
],
"loc": {
"start": {
"line": 13,
"column": 71
},
"end": {
"line": 13,
"column": 86
}
}
},
{
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
654,
658
],
"loc": {
"start": {
"line": 13,
"column": 88
},
"end": {
"line": 13,
"column": 92
}
}
},
"property": {
"type": "Identifier",
"name": "resultSelector",
"range": [
659,
673
],
"loc": {
"start": {
"line": 13,
"column": 93
},
"end": {
"line": 13,
"column": 107
}
}
},
"range": [
654,
673
],
"loc": {
"start": {
"line": 13,
"column": 88
},
"end": {
"line": 13,
"column": 107
}
}
}
],
"range": [
599,
674
],
"loc": {
"start": {
"line": 13,
"column": 33
},
"end": {
"line": 13,
"column": 108
}
}
}
],
"range": [
581,
675
],
"loc": {
"start": {
"line": 13,
"column": 15
},
"end": {
"line": 13,
"column": 109
}
}
},
"range": [
574,
676
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 110
}
}
}
],
"range": [
564,
682
],
"loc": {
"start": {
"line": 12,
"column": 71
},
"end": {
"line": 14,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
534,
682
],
"loc": {
"start": {
"line": 12,
"column": 41
},
"end": {
"line": 14,
"column": 5
}
}
},
"range": [
497,
682
],
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 14,
"column": 5
}
}
},
"range": [
497,
683
],
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 14,
"column": 6
}
}
},
{
"type": "ReturnStatement",
"argument": {
"type": "Identifier",
"name": "SwitchMapToOperator",
"range": [
695,
714
],
"loc": {
"start": {
"line": 15,
"column": 11
},
"end": {
"line": 15,
"column": 30
}
}
},
"range": [
688,
715
],
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 31
}
}
}
],
"range": [
338,
717
],
"loc": {
"start": {
"line": 7,
"column": 39
},
"end": {
"line": 16,
"column": 1
}
}
},
"generator": false,
"expression": false,
"range": [
326,
717
],
"loc": {
"start": {
"line": 7,
"column": 27
},
"end": {
"line": 16,
"column": 1
}
}
},
"arguments": [],
"range": [
326,
719
],
"loc": {
"start": {
"line": 7,
"column": 27
},
"end": {
"line": 16,
"column": 3
}
}
},
"range": [
303,
720
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 16,
"column": 4
}
}
}
],
"kind": "var",
"range": [
299,
721
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 16,
"column": 5
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n ",
"range": [
722,
813
],
"loc": {
"start": {
"line": 17,
"column": 0
},
"end": {
"line": 21,
"column": 3
}
}
}
]
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "SwitchMapToSubscriber",
"range": [
818,
839
],
"loc": {
"start": {
"line": 22,
"column": 4
},
"end": {
"line": 22,
"column": 25
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "_super",
"range": [
853,
859
],
"loc": {
"start": {
"line": 22,
"column": 39
},
"end": {
"line": 22,
"column": 45
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "__extends",
"range": [
867,
876
],
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 13
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "SwitchMapToSubscriber",
"range": [
877,
898
],
"loc": {
"start": {
"line": 23,
"column": 14
},
"end": {
"line": 23,
"column": 35
}
}
},
{
"type": "Identifier",