@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,625 lines (1,624 loc) • 868 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Subject",
"range": [
9,
16
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 16
}
}
},
"imported": {
"type": "Identifier",
"name": "Subject",
"range": [
9,
16
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 16
}
}
},
"range": [
9,
16
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 16
}
}
},
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "AnonymousSubject",
"range": [
18,
34
],
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 34
}
}
},
"imported": {
"type": "Identifier",
"name": "AnonymousSubject",
"range": [
18,
34
],
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 34
}
}
},
"range": [
18,
34
],
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 34
}
}
}
],
"source": {
"type": "Literal",
"value": "../../Subject",
"raw": "'../../Subject'",
"range": [
42,
57
],
"loc": {
"start": {
"line": 1,
"column": 42
},
"end": {
"line": 1,
"column": 57
}
}
},
"range": [
0,
58
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 58
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Subscriber",
"range": [
68,
78
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 19
}
}
},
"imported": {
"type": "Identifier",
"name": "Subscriber",
"range": [
68,
78
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 19
}
}
},
"range": [
68,
78
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 19
}
}
}
],
"source": {
"type": "Literal",
"value": "../../Subscriber",
"raw": "'../../Subscriber'",
"range": [
86,
104
],
"loc": {
"start": {
"line": 2,
"column": 27
},
"end": {
"line": 2,
"column": 45
}
}
},
"range": [
59,
105
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 46
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Observable",
"range": [
115,
125
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 19
}
}
},
"imported": {
"type": "Identifier",
"name": "Observable",
"range": [
115,
125
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 19
}
}
},
"range": [
115,
125
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 19
}
}
}
],
"source": {
"type": "Literal",
"value": "../../Observable",
"raw": "'../../Observable'",
"range": [
133,
151
],
"loc": {
"start": {
"line": 3,
"column": 27
},
"end": {
"line": 3,
"column": 45
}
}
},
"range": [
106,
152
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 46
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Subscription",
"range": [
162,
174
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 21
}
}
},
"imported": {
"type": "Identifier",
"name": "Subscription",
"range": [
162,
174
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 21
}
}
},
"range": [
162,
174
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 21
}
}
}
],
"source": {
"type": "Literal",
"value": "../../Subscription",
"raw": "'../../Subscription'",
"range": [
182,
202
],
"loc": {
"start": {
"line": 4,
"column": 29
},
"end": {
"line": 4,
"column": 49
}
}
},
"range": [
153,
203
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 50
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "root",
"range": [
213,
217
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 13
}
}
},
"imported": {
"type": "Identifier",
"name": "root",
"range": [
213,
217
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 13
}
}
},
"range": [
213,
217
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 13
}
}
}
],
"source": {
"type": "Literal",
"value": "../../util/root",
"raw": "'../../util/root'",
"range": [
225,
242
],
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 38
}
}
},
"range": [
204,
243
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 39
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "ReplaySubject",
"range": [
253,
266
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 22
}
}
},
"imported": {
"type": "Identifier",
"name": "ReplaySubject",
"range": [
253,
266
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 22
}
}
},
"range": [
253,
266
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 22
}
}
}
],
"source": {
"type": "Literal",
"value": "../../ReplaySubject",
"raw": "'../../ReplaySubject'",
"range": [
274,
295
],
"loc": {
"start": {
"line": 6,
"column": 30
},
"end": {
"line": 6,
"column": 51
}
}
},
"range": [
244,
296
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 52
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "tryCatch",
"range": [
306,
314
],
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 17
}
}
},
"imported": {
"type": "Identifier",
"name": "tryCatch",
"range": [
306,
314
],
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 17
}
}
},
"range": [
306,
314
],
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 17
}
}
}
],
"source": {
"type": "Literal",
"value": "../../util/tryCatch",
"raw": "'../../util/tryCatch'",
"range": [
322,
343
],
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 7,
"column": 46
}
}
},
"range": [
297,
344
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 47
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "errorObject",
"range": [
354,
365
],
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 20
}
}
},
"imported": {
"type": "Identifier",
"name": "errorObject",
"range": [
354,
365
],
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 20
}
}
},
"range": [
354,
365
],
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 20
}
}
}
],
"source": {
"type": "Literal",
"value": "../../util/errorObject",
"raw": "'../../util/errorObject'",
"range": [
373,
397
],
"loc": {
"start": {
"line": 8,
"column": 28
},
"end": {
"line": 8,
"column": 52
}
}
},
"range": [
345,
398
],
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 53
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "assign",
"range": [
408,
414
],
"loc": {
"start": {
"line": 9,
"column": 9
},
"end": {
"line": 9,
"column": 15
}
}
},
"imported": {
"type": "Identifier",
"name": "assign",
"range": [
408,
414
],
"loc": {
"start": {
"line": 9,
"column": 9
},
"end": {
"line": 9,
"column": 15
}
}
},
"range": [
408,
414
],
"loc": {
"start": {
"line": 9,
"column": 9
},
"end": {
"line": 9,
"column": 15
}
}
}
],
"source": {
"type": "Literal",
"value": "../../util/assign",
"raw": "'../../util/assign'",
"range": [
422,
441
],
"loc": {
"start": {
"line": 9,
"column": 23
},
"end": {
"line": 9,
"column": 42
}
}
},
"range": [
399,
442
],
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 43
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n ",
"range": [
443,
537
],
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 14,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "WebSocketSubject",
"range": [
549,
565
],
"loc": {
"start": {
"line": 15,
"column": 11
},
"end": {
"line": 15,
"column": 27
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "_super",
"range": [
579,
585
],
"loc": {
"start": {
"line": 15,
"column": 41
},
"end": {
"line": 15,
"column": 47
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "__extends",
"range": [
593,
602
],
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 13
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "WebSocketSubject",
"range": [
603,
619
],
"loc": {
"start": {
"line": 16,
"column": 14
},
"end": {
"line": 16,
"column": 30
}
}
},
{
"type": "Identifier",
"name": "_super",
"range": [
621,
627
],
"loc": {
"start": {
"line": 16,
"column": 32
},
"end": {
"line": 16,
"column": 38
}
}
}
],
"range": [
593,
628
],
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 39
}
}
},
"range": [
593,
629
],
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 40
}
}
},
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "WebSocketSubject",
"range": [
643,
659
],
"loc": {
"start": {
"line": 17,
"column": 13
},
"end": {
"line": 17,
"column": 29
}
}
},
"params": [
{
"type": "Identifier",
"name": "urlConfigOrSource",
"range": [
660,
677
],
"loc": {
"start": {
"line": 17,
"column": 30
},
"end": {
"line": 17,
"column": 47
}
}
},
{
"type": "Identifier",
"name": "destination",
"range": [
679,
690
],
"loc": {
"start": {
"line": 17,
"column": 49
},
"end": {
"line": 17,
"column": 60
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "BinaryExpression",
"operator": "instanceof",
"left": {
"type": "Identifier",
"name": "urlConfigOrSource",
"range": [
706,
723
],
"loc": {
"start": {
"line": 18,
"column": 12
},
"end": {
"line": 18,
"column": 29
}
}
},
"right": {
"type": "Identifier",
"name": "Observable",
"range": [
735,
745
],
"loc": {
"start": {
"line": 18,
"column": 41
},
"end": {
"line": 18,
"column": 51
}
}
},
"range": [
706,
745
],
"loc": {
"start": {
"line": 18,
"column": 12
},
"end": {
"line": 18,
"column": 51
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "_super",
"range": [
761,
767
],
"loc": {
"start": {
"line": 19,
"column": 12
},
"end": {
"line": 19,
"column": 18
}
}
},
"property": {
"type": "Identifier",
"name": "call",
"range": [
768,
772
],
"loc": {
"start": {
"line": 19,
"column": 19
},
"end": {
"line": 19,
"column": 23
}
}
},
"range": [
761,
772
],
"loc": {
"start": {
"line": 19,
"column": 12
},
"end": {
"line": 19,
"column": 23
}
}
},
"arguments": [
{
"type": "ThisExpression",
"range": [
773,
777
],
"loc": {
"start": {
"line": 19,
"column": 24
},
"end": {
"line": 19,
"column": 28
}
}
},
{
"type": "Identifier",
"name": "destination",
"range": [
779,
790
],
"loc": {
"start": {
"line": 19,
"column": 30
},
"end": {
"line": 19,
"column": 41
}
}
},
{
"type": "Identifier",
"name": "urlConfigOrSource",
"range": [
792,
809
],
"loc": {
"start": {
"line": 19,
"column": 43
},
"end": {
"line": 19,
"column": 60
}
}
}
],
"range": [
761,
810
],
"loc": {
"start": {
"line": 19,
"column": 12
},
"end": {
"line": 19,
"column": 61
}
}
},
"range": [
761,
811
],
"loc": {
"start": {
"line": 19,
"column": 12
},
"end": {
"line": 19,
"column": 62
}
}
}
],
"range": [
747,
821
],
"loc": {
"start": {
"line": 18,
"column": 53
},
"end": {
"line": 20,
"column": 9
}
}
},
"alternate": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "_super",
"range": [
849,
855
],
"loc": {
"start": {
"line": 22,
"column": 12
},
"end": {
"line": 22,
"column": 18
}
}
},
"property": {
"type": "Identifier",
"name": "call",
"range": [
856,
860
],
"loc": {
"start": {
"line": 22,
"column": 19
},
"end": {
"line": 22,
"column": 23
}
}
},
"range": [
849,
860
],
"loc": {
"start": {
"line": 22,
"column": 12
},
"end": {
"line": 22,
"column": 23
}
}
},
"arguments": [
{
"type": "ThisExpression",
"range": [
861,
865
],
"loc": {
"start": {
"line": 22,
"column": 24
},
"end": {
"line": 22,
"column": 28
}
}
}
],
"range": [
849,
866
],
"loc": {
"start": {
"line": 22,
"column": 12
},
"end": {
"line": 22,
"column": 29
}
}
},
"range": [
849,
867
],
"loc": {
"start": {
"line": 22,
"column": 12
},
"end": {
"line": 22,
"column": 30
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
880,
884
],
"loc": {
"start": {
"line": 23,
"column": 12
},
"end": {
"line": 23,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"name": "WebSocketCtor",
"range": [
885,
898
],
"loc": {
"start": {
"line": 23,
"column": 17
},
"end": {
"line": 23,
"column": 30
}
}
},
"range": [
880,
898
],
"loc": {
"start": {
"line": 23,
"column": 12
},
"end": {
"line": 23,
"column": 30
}
}
},
"right": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "root",
"range": [
901,
905
],
"loc": {
"start": {
"line": 23,
"column": 33
},
"end": {
"line": 23,
"column": 37
}
}
},
"property": {
"type": "Identifier",
"name": "WebSocket",
"range": [
906,
915
],
"loc": {
"start": {
"line": 23,
"column": 38
},
"end": {
"line": 23,
"column": 47
}
}
},
"range": [
901,
915
],
"loc": {
"start": {
"line": 23,
"column": 33
},
"end": {
"line": 23,
"column": 47
}
}
},
"range": [
880,
915
],
"loc": {
"start": {
"line": 23,
"column": 12
},
"end": {
"line": 23,
"column": 47
}
}
},
"range": [
880,
916
],
"loc": {
"start": {
"line": 23,
"column": 12
},
"end": {
"line": 23,
"column": 48
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
929,
933
],
"loc": {
"start": {
"line": 24,
"column": 12
},
"end": {
"line": 24,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"name": "_output",
"range": [
934,
941
],
"loc": {
"start": {
"line": 24,
"column": 17
},
"end": {
"line": 24,
"column": 24
}
}
},
"range": [
929,
941
],
"loc": {
"start": {
"line": 24,
"column": 12
},
"end": {
"line": 24,
"column": 24