@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,632 lines (1,631 loc) • 95.7 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "connectableObservableDescriptor",
"range": [
9,
40
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 40
}
}
},
"imported": {
"type": "Identifier",
"name": "connectableObservableDescriptor",
"range": [
9,
40
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 40
}
}
},
"range": [
9,
40
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 40
}
}
}
],
"source": {
"type": "Literal",
"value": "../observable/ConnectableObservable",
"raw": "'../observable/ConnectableObservable'",
"range": [
48,
85
],
"loc": {
"start": {
"line": 1,
"column": 48
},
"end": {
"line": 1,
"column": 85
}
}
},
"range": [
0,
86
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 86
}
},
"trailingComments": [
{
"type": "Block",
"value": " tslint:disable:max-line-length ",
"range": [
87,
123
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 36
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "multicast",
"range": [
140,
149
],
"loc": {
"start": {
"line": 3,
"column": 16
},
"end": {
"line": 3,
"column": 25
}
}
},
"params": [
{
"type": "Identifier",
"name": "subjectOrSubjectFactory",
"range": [
150,
173
],
"loc": {
"start": {
"line": 3,
"column": 26
},
"end": {
"line": 3,
"column": 49
}
}
},
{
"type": "Identifier",
"name": "selector",
"range": [
175,
183
],
"loc": {
"start": {
"line": 3,
"column": 51
},
"end": {
"line": 3,
"column": 59
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "subjectFactory",
"range": [
195,
209
],
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 22
}
}
},
"init": null,
"range": [
195,
209
],
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 22
}
}
}
],
"kind": "var",
"range": [
191,
210
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 23
}
}
},
{
"type": "IfStatement",
"test": {
"type": "BinaryExpression",
"operator": "===",
"left": {
"type": "UnaryExpression",
"operator": "typeof",
"argument": {
"type": "Identifier",
"name": "subjectOrSubjectFactory",
"range": [
226,
249
],
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 5,
"column": 38
}
}
},
"prefix": true,
"range": [
219,
249
],
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 38
}
}
},
"right": {
"type": "Literal",
"value": "function",
"raw": "'function'",
"range": [
254,
264
],
"loc": {
"start": {
"line": 5,
"column": 43
},
"end": {
"line": 5,
"column": 53
}
}
},
"range": [
219,
264
],
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 53
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "subjectFactory",
"range": [
276,
290
],
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 22
}
}
},
"right": {
"type": "Identifier",
"name": "subjectOrSubjectFactory",
"range": [
293,
316
],
"loc": {
"start": {
"line": 6,
"column": 25
},
"end": {
"line": 6,
"column": 48
}
}
},
"range": [
276,
316
],
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 48
}
}
},
"range": [
276,
317
],
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 49
}
}
}
],
"range": [
266,
323
],
"loc": {
"start": {
"line": 5,
"column": 55
},
"end": {
"line": 7,
"column": 5
}
}
},
"alternate": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "subjectFactory",
"range": [
343,
357
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 22
}
}
},
"right": {
"type": "FunctionExpression",
"id": {
"type": "Identifier",
"name": "subjectFactory",
"range": [
369,
383
],
"loc": {
"start": {
"line": 9,
"column": 34
},
"end": {
"line": 9,
"column": 48
}
}
},
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "Identifier",
"name": "subjectOrSubjectFactory",
"range": [
407,
430
],
"loc": {
"start": {
"line": 10,
"column": 19
},
"end": {
"line": 10,
"column": 42
}
}
},
"range": [
400,
431
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 43
}
}
}
],
"range": [
386,
441
],
"loc": {
"start": {
"line": 9,
"column": 51
},
"end": {
"line": 11,
"column": 9
}
}
},
"generator": false,
"expression": false,
"range": [
360,
441
],
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 11,
"column": 9
}
}
},
"range": [
343,
441
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 11,
"column": 9
}
}
},
"range": [
343,
442
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 11,
"column": 10
}
}
}
],
"range": [
333,
448
],
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 12,
"column": 5
}
}
},
"range": [
215,
448
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 12,
"column": 5
}
}
},
{
"type": "IfStatement",
"test": {
"type": "BinaryExpression",
"operator": "===",
"left": {
"type": "UnaryExpression",
"operator": "typeof",
"argument": {
"type": "Identifier",
"name": "selector",
"range": [
464,
472
],
"loc": {
"start": {
"line": 13,
"column": 15
},
"end": {
"line": 13,
"column": 23
}
}
},
"prefix": true,
"range": [
457,
472
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 23
}
}
},
"right": {
"type": "Literal",
"value": "function",
"raw": "'function'",
"range": [
477,
487
],
"loc": {
"start": {
"line": 13,
"column": 28
},
"end": {
"line": 13,
"column": 38
}
}
},
"range": [
457,
487
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 38
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
506,
510
],
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "lift",
"range": [
511,
515
],
"loc": {
"start": {
"line": 14,
"column": 20
},
"end": {
"line": 14,
"column": 24
}
}
},
"range": [
506,
515
],
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 24
}
}
},
"arguments": [
{
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "MulticastOperator",
"range": [
520,
537
],
"loc": {
"start": {
"line": 14,
"column": 29
},
"end": {
"line": 14,
"column": 46
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "subjectFactory",
"range": [
538,
552
],
"loc": {
"start": {
"line": 14,
"column": 47
},
"end": {
"line": 14,
"column": 61
}
}
},
{
"type": "Identifier",
"name": "selector",
"range": [
554,
562
],
"loc": {
"start": {
"line": 14,
"column": 63
},
"end": {
"line": 14,
"column": 71
}
}
}
],
"range": [
516,
563
],
"loc": {
"start": {
"line": 14,
"column": 25
},
"end": {
"line": 14,
"column": 72
}
}
}
],
"range": [
506,
564
],
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 73
}
}
},
"range": [
499,
565
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 74
}
}
}
],
"range": [
489,
571
],
"loc": {
"start": {
"line": 13,
"column": 40
},
"end": {
"line": 15,
"column": 5
}
}
},
"alternate": null,
"range": [
453,
571
],
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 15,
"column": 5
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "connectable",
"range": [
580,
591
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 19
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Object",
"range": [
594,
600
],
"loc": {
"start": {
"line": 16,
"column": 22
},
"end": {
"line": 16,
"column": 28
}
}
},
"property": {
"type": "Identifier",
"name": "create",
"range": [
601,
607
],
"loc": {
"start": {
"line": 16,
"column": 29
},
"end": {
"line": 16,
"column": 35
}
}
},
"range": [
594,
607
],
"loc": {
"start": {
"line": 16,
"column": 22
},
"end": {
"line": 16,
"column": 35
}
}
},
"arguments": [
{
"type": "ThisExpression",
"range": [
608,
612
],
"loc": {
"start": {
"line": 16,
"column": 36
},
"end": {
"line": 16,
"column": 40
}
}
},
{
"type": "Identifier",
"name": "connectableObservableDescriptor",
"range": [
614,
645
],
"loc": {
"start": {
"line": 16,
"column": 42
},
"end": {
"line": 16,
"column": 73
}
}
}
],
"range": [
594,
646
],
"loc": {
"start": {
"line": 16,
"column": 22
},
"end": {
"line": 16,
"column": 74
}
}
},
"range": [
580,
646
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 74
}
}
}
],
"kind": "var",
"range": [
576,
647
],
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 75
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "connectable",
"range": [
652,
663
],
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"name": "source",
"range": [
664,
670
],
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 22
}
}
},
"range": [
652,
670
],
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 22
}
}
},
"right": {
"type": "ThisExpression",
"range": [
673,
677
],
"loc": {
"start": {
"line": 17,
"column": 25
},
"end": {
"line": 17,
"column": 29
}
}
},
"range": [
652,
677
],
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 29
}
}
},
"range": [
652,
678
],
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 30
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "connectable",
"range": [
683,
694
],
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"name": "subjectFactory",
"range": [
695,
709
],
"loc": {
"start": {
"line": 18,
"column": 16
},
"end": {
"line": 18,
"column": 30
}
}
},
"range": [
683,
709
],
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 30
}
}
},
"right": {
"type": "Identifier",
"name": "subjectFactory",
"range": [
712,
726
],
"loc": {
"start": {
"line": 18,
"column": 33
},
"end": {
"line": 18,
"column": 47
}
}
},
"range": [
683,
726
],
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 47
}
}
},
"range": [
683,
727
],
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 48
}
}
},
{
"type": "ReturnStatement",
"argument": {
"type": "Identifier",
"name": "connectable",
"range": [
739,
750
],
"loc": {
"start": {
"line": 19,
"column": 11
},
"end": {
"line": 19,
"column": 22
}
}
},
"range": [
732,
751
],
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 23
}
}
}
],
"range": [
185,
753
],
"loc": {
"start": {
"line": 3,
"column": 61
},
"end": {
"line": 20,
"column": 1
}
}
},
"generator": false,
"expression": false,
"range": [
131,
753
],
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 20,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": " tslint:disable:max-line-length ",
"range": [
87,
123
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 36
}
}
}
],
"trailingComments": []
},
"specifiers": [],
"source": null,
"range": [
124,
753
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 20,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": " tslint:disable:max-line-length ",
"range": [
87,
123
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 36
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "MulticastOperator",
"range": [
765,
782
],
"loc": {
"start": {
"line": 21,
"column": 11
},
"end": {
"line": 21,
"column": 28
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "MulticastOperator",
"range": [
813,
830
],
"loc": {
"start": {
"line": 22,
"column": 13
},
"end": {
"line": 22,
"column": 30
}
}
},
"params": [
{
"type": "Identifier",
"name": "subjectFactory",
"range": [
831,
845
],
"loc": {
"start": {
"line": 22,
"column": 31
},
"end": {
"line": 22,
"column": 45
}
}
},
{
"type": "Identifier",
"name": "selector",
"range": [
847,
855
],
"loc": {
"start": {
"line": 22,
"column": 47
},
"end": {
"line": 22,
"column": 55
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
867,
871
],
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "subjectFactory",
"range": [
872,
886
],
"loc": {
"start": {
"line": 23,
"column": 13
},
"end": {
"line": 23,
"column": 27
}
}
},
"range": [
867,
886
],
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 27
}
}
},
"right": {
"type": "Identifier",
"name": "subjectFactory",
"range": [
889,
903
],
"loc": {
"start": {
"line": 23,
"column": 30
},
"end": {
"line": 23,
"column": 44
}
}
},
"range": [
867,
903
],
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 44
}
}
},
"range": [
867,
904
],
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 45
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
913,
917
],
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "selector",
"range": [
918,
926
],
"loc": {
"start": {
"line": 24,
"column": 13
},
"end": {
"line": 24,
"column": 21
}
}
},
"range": [
913,
926
],
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 21
}
}
},
"right": {
"type": "Identifier",
"name": "selector",
"range": [
929,
937
],
"loc": {
"start": {
"line": 24,
"column": 24
},
"end": {
"line": 24,
"column": 32
}
}
},
"range": [