@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,498 lines (1,497 loc) • 359 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
}
}
}
],
"source": {
"type": "Literal",
"value": "./Subject",
"raw": "'./Subject'",
"range": [
24,
35
],
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 35
}
}
},
"range": [
0,
36
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 36
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "queue",
"range": [
46,
51
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 14
}
}
},
"imported": {
"type": "Identifier",
"name": "queue",
"range": [
46,
51
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 14
}
}
},
"range": [
46,
51
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 14
}
}
}
],
"source": {
"type": "Literal",
"value": "./scheduler/queue",
"raw": "'./scheduler/queue'",
"range": [
59,
78
],
"loc": {
"start": {
"line": 2,
"column": 22
},
"end": {
"line": 2,
"column": 41
}
}
},
"range": [
37,
79
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 42
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Subscription",
"range": [
89,
101
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 21
}
}
},
"imported": {
"type": "Identifier",
"name": "Subscription",
"range": [
89,
101
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 21
}
}
},
"range": [
89,
101
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 21
}
}
}
],
"source": {
"type": "Literal",
"value": "./Subscription",
"raw": "'./Subscription'",
"range": [
109,
125
],
"loc": {
"start": {
"line": 3,
"column": 29
},
"end": {
"line": 3,
"column": 45
}
}
},
"range": [
80,
126
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 46
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "ObserveOnSubscriber",
"range": [
136,
155
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 28
}
}
},
"imported": {
"type": "Identifier",
"name": "ObserveOnSubscriber",
"range": [
136,
155
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 28
}
}
},
"range": [
136,
155
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 28
}
}
}
],
"source": {
"type": "Literal",
"value": "./operator/observeOn",
"raw": "'./operator/observeOn'",
"range": [
163,
185
],
"loc": {
"start": {
"line": 4,
"column": 36
},
"end": {
"line": 4,
"column": 58
}
}
},
"range": [
127,
186
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 59
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "ObjectUnsubscribedError",
"range": [
196,
219
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 32
}
}
},
"imported": {
"type": "Identifier",
"name": "ObjectUnsubscribedError",
"range": [
196,
219
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 32
}
}
},
"range": [
196,
219
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 32
}
}
}
],
"source": {
"type": "Literal",
"value": "./util/ObjectUnsubscribedError",
"raw": "'./util/ObjectUnsubscribedError'",
"range": [
227,
259
],
"loc": {
"start": {
"line": 5,
"column": 40
},
"end": {
"line": 5,
"column": 72
}
}
},
"range": [
187,
260
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 73
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "SubjectSubscription",
"range": [
270,
289
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 28
}
}
},
"imported": {
"type": "Identifier",
"name": "SubjectSubscription",
"range": [
270,
289
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 28
}
}
},
"range": [
270,
289
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 28
}
}
}
],
"source": {
"type": "Literal",
"value": "./SubjectSubscription",
"raw": "'./SubjectSubscription'",
"range": [
297,
320
],
"loc": {
"start": {
"line": 6,
"column": 36
},
"end": {
"line": 6,
"column": 59
}
}
},
"range": [
261,
321
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 60
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * @class ReplaySubject<T>\n ",
"range": [
322,
356
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 9,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "ReplaySubject",
"range": [
368,
381
],
"loc": {
"start": {
"line": 10,
"column": 11
},
"end": {
"line": 10,
"column": 24
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "_super",
"range": [
395,
401
],
"loc": {
"start": {
"line": 10,
"column": 38
},
"end": {
"line": 10,
"column": 44
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "__extends",
"range": [
409,
418
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 13
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "ReplaySubject",
"range": [
419,
432
],
"loc": {
"start": {
"line": 11,
"column": 14
},
"end": {
"line": 11,
"column": 27
}
}
},
{
"type": "Identifier",
"name": "_super",
"range": [
434,
440
],
"loc": {
"start": {
"line": 11,
"column": 29
},
"end": {
"line": 11,
"column": 35
}
}
}
],
"range": [
409,
441
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 36
}
}
},
"range": [
409,
442
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 37
}
}
},
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "ReplaySubject",
"range": [
456,
469
],
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 26
}
}
},
"params": [
{
"type": "Identifier",
"name": "bufferSize",
"range": [
470,
480
],
"loc": {
"start": {
"line": 12,
"column": 27
},
"end": {
"line": 12,
"column": 37
}
}
},
{
"type": "Identifier",
"name": "windowTime",
"range": [
482,
492
],
"loc": {
"start": {
"line": 12,
"column": 39
},
"end": {
"line": 12,
"column": 49
}
}
},
{
"type": "Identifier",
"name": "scheduler",
"range": [
494,
503
],
"loc": {
"start": {
"line": 12,
"column": 51
},
"end": {
"line": 12,
"column": 60
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "BinaryExpression",
"operator": "===",
"left": {
"type": "Identifier",
"name": "bufferSize",
"range": [
519,
529
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 22
}
}
},
"right": {
"type": "UnaryExpression",
"operator": "void",
"argument": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
539,
540
],
"loc": {
"start": {
"line": 13,
"column": 32
},
"end": {
"line": 13,
"column": 33
}
}
},
"prefix": true,
"range": [
534,
540
],
"loc": {
"start": {
"line": 13,
"column": 27
},
"end": {
"line": 13,
"column": 33
}
}
},
"range": [
519,
540
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 33
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "bufferSize",
"range": [
544,
554
],
"loc": {
"start": {
"line": 13,
"column": 37
},
"end": {
"line": 13,
"column": 47
}
}
},
"right": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Number",
"range": [
557,
563
],
"loc": {
"start": {
"line": 13,
"column": 50
},
"end": {
"line": 13,
"column": 56
}
}
},
"property": {
"type": "Identifier",
"name": "POSITIVE_INFINITY",
"range": [
564,
581
],
"loc": {
"start": {
"line": 13,
"column": 57
},
"end": {
"line": 13,
"column": 74
}
}
},
"range": [
557,
581
],
"loc": {
"start": {
"line": 13,
"column": 50
},
"end": {
"line": 13,
"column": 74
}
}
},
"range": [
544,
581
],
"loc": {
"start": {
"line": 13,
"column": 37
},
"end": {
"line": 13,
"column": 74
}
}
},
"range": [
544,
582
],
"loc": {
"start": {
"line": 13,
"column": 37
},
"end": {
"line": 13,
"column": 75
}
}
}
],
"range": [
542,
584
],
"loc": {
"start": {
"line": 13,
"column": 35
},
"end": {
"line": 13,
"column": 77
}
}
},
"alternate": null,
"range": [
515,
584
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 77
}
}
},
{
"type": "IfStatement",
"test": {
"type": "BinaryExpression",
"operator": "===",
"left": {
"type": "Identifier",
"name": "windowTime",
"range": [
597,
607
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 22
}
}
},
"right": {
"type": "UnaryExpression",
"operator": "void",
"argument": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
617,
618
],
"loc": {
"start": {
"line": 14,
"column": 32
},
"end": {
"line": 14,
"column": 33
}
}
},
"prefix": true,
"range": [
612,
618
],
"loc": {
"start": {
"line": 14,
"column": 27
},
"end": {
"line": 14,
"column": 33
}
}
},
"range": [
597,
618
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 33
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "windowTime",
"range": [
622,
632
],
"loc": {
"start": {
"line": 14,
"column": 37
},
"end": {
"line": 14,
"column": 47
}
}
},
"right": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Number",
"range": [
635,
641
],
"loc": {
"start": {
"line": 14,
"column": 50
},
"end": {
"line": 14,
"column": 56
}
}
},
"property": {
"type": "Identifier",
"name": "POSITIVE_INFINITY",
"range": [
642,
659
],
"loc": {
"start": {
"line": 14,
"column": 57
},
"end": {
"line": 14,
"column": 74
}
}
},
"range": [
635,
659
],
"loc": {
"start": {
"line": 14,
"column": 50
},
"end": {
"line": 14,
"column": 74
}
}
},
"range": [
622,
659
],
"loc": {
"start": {
"line": 14,
"column": 37
},
"end": {
"line": 14,
"column": 74
}
}
},
"range": [
622,
660
],
"loc": {
"start": {
"line": 14,
"column": 37
},
"end": {
"line": 14,
"column": 75
}
}
}
],
"range": [
620,
662
],
"loc": {
"start": {
"line": 14,
"column": 35
},
"end": {
"line": 14,
"column": 77
}
}
},
"alternate": null,
"range": [
593,
662
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 77
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "_super",
"range": [
671,
677
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 14
}
}
},
"property": {
"type": "Identifier",
"name": "call",
"range": [
678,
682
],
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 19
}
}
},
"range": [
671,
682
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 19
}
}
},
"arguments": [
{
"type": "ThisExpression",
"range": [
683,
687
],
"loc": {
"start": {
"line": 15,
"column": 20
},
"end": {
"line": 15,
"column": 24
}
}
}
],
"range": [
671,
688
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 25
}
}
},
"range": [
671,
689
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 26
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
698,
702
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "scheduler",
"range": [
703,
712
],
"loc": {
"start": {
"line": 16,
"column": 13
},
"end": {
"line": 16,
"column": 22
}
}
},
"range": [
698,
712
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 22
}
}
},
"right": {
"type": "Identifier",
"name": "scheduler",
"range": [
715,
724
],
"loc": {
"start": {
"line": 16,
"column": 25
},
"end": {
"line": 16,
"column": 34
}
}
},
"range": [
698,
724
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 34
}
}
},
"range": [
698,
725
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 35
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
734,
738
],
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "_events",
"range": [
739,
746
],
"loc": {
"start": {
"line": 17,
"column": 13
},
"end": {
"line": 17,
"column": 20
}
}
},
"range": [
734,
746
],
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 20
}
}