@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,710 lines (1,709 loc) • 702 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Subscriber",
"range": [
9,
19
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 19
}
}
},
"imported": {
"type": "Identifier",
"name": "Subscriber",
"range": [
9,
19
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 19
}
}
},
"range": [
9,
19
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 19
}
}
}
],
"source": {
"type": "Literal",
"value": "../Subscriber",
"raw": "'../Subscriber'",
"range": [
27,
42
],
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 42
}
}
},
"range": [
0,
43
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 43
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Subscription",
"range": [
53,
65
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 21
}
}
},
"imported": {
"type": "Identifier",
"name": "Subscription",
"range": [
53,
65
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 21
}
}
},
"range": [
53,
65
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 21
}
}
}
],
"source": {
"type": "Literal",
"value": "../Subscription",
"raw": "'../Subscription'",
"range": [
73,
90
],
"loc": {
"start": {
"line": 2,
"column": 29
},
"end": {
"line": 2,
"column": 46
}
}
},
"range": [
44,
91
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 47
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Observable",
"range": [
101,
111
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 19
}
}
},
"imported": {
"type": "Identifier",
"name": "Observable",
"range": [
101,
111
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 19
}
}
},
"range": [
101,
111
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 19
}
}
}
],
"source": {
"type": "Literal",
"value": "../Observable",
"raw": "'../Observable'",
"range": [
119,
134
],
"loc": {
"start": {
"line": 3,
"column": 27
},
"end": {
"line": 3,
"column": 42
}
}
},
"range": [
92,
135
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 43
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Subject",
"range": [
145,
152
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 16
}
}
},
"imported": {
"type": "Identifier",
"name": "Subject",
"range": [
145,
152
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 16
}
}
},
"range": [
145,
152
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 16
}
}
}
],
"source": {
"type": "Literal",
"value": "../Subject",
"raw": "'../Subject'",
"range": [
160,
172
],
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 36
}
}
},
"range": [
136,
173
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 37
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Map",
"range": [
183,
186
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 12
}
}
},
"imported": {
"type": "Identifier",
"name": "Map",
"range": [
183,
186
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 12
}
}
},
"range": [
183,
186
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 12
}
}
}
],
"source": {
"type": "Literal",
"value": "../util/Map",
"raw": "'../util/Map'",
"range": [
194,
207
],
"loc": {
"start": {
"line": 5,
"column": 20
},
"end": {
"line": 5,
"column": 33
}
}
},
"range": [
174,
208
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 34
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "FastMap",
"range": [
218,
225
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 16
}
}
},
"imported": {
"type": "Identifier",
"name": "FastMap",
"range": [
218,
225
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 16
}
}
},
"range": [
218,
225
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 16
}
}
}
],
"source": {
"type": "Literal",
"value": "../util/FastMap",
"raw": "'../util/FastMap'",
"range": [
233,
250
],
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 41
}
}
},
"range": [
209,
251
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 42
}
},
"trailingComments": [
{
"type": "Block",
"value": " tslint:disable:max-line-length ",
"range": [
252,
288
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 36
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "groupBy",
"range": [
305,
312
],
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 23
}
}
},
"params": [
{
"type": "Identifier",
"name": "keySelector",
"range": [
313,
324
],
"loc": {
"start": {
"line": 8,
"column": 24
},
"end": {
"line": 8,
"column": 35
}
}
},
{
"type": "Identifier",
"name": "elementSelector",
"range": [
326,
341
],
"loc": {
"start": {
"line": 8,
"column": 37
},
"end": {
"line": 8,
"column": 52
}
}
},
{
"type": "Identifier",
"name": "durationSelector",
"range": [
343,
359
],
"loc": {
"start": {
"line": 8,
"column": 54
},
"end": {
"line": 8,
"column": 70
}
}
},
{
"type": "Identifier",
"name": "subjectSelector",
"range": [
361,
376
],
"loc": {
"start": {
"line": 8,
"column": 72
},
"end": {
"line": 8,
"column": 87
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
391,
395
],
"loc": {
"start": {
"line": 9,
"column": 11
},
"end": {
"line": 9,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"name": "lift",
"range": [
396,
400
],
"loc": {
"start": {
"line": 9,
"column": 16
},
"end": {
"line": 9,
"column": 20
}
}
},
"range": [
391,
400
],
"loc": {
"start": {
"line": 9,
"column": 11
},
"end": {
"line": 9,
"column": 20
}
}
},
"arguments": [
{
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "GroupByOperator",
"range": [
405,
420
],
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 9,
"column": 40
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "keySelector",
"range": [
421,
432
],
"loc": {
"start": {
"line": 9,
"column": 41
},
"end": {
"line": 9,
"column": 52
}
}
},
{
"type": "Identifier",
"name": "elementSelector",
"range": [
434,
449
],
"loc": {
"start": {
"line": 9,
"column": 54
},
"end": {
"line": 9,
"column": 69
}
}
},
{
"type": "Identifier",
"name": "durationSelector",
"range": [
451,
467
],
"loc": {
"start": {
"line": 9,
"column": 71
},
"end": {
"line": 9,
"column": 87
}
}
},
{
"type": "Identifier",
"name": "subjectSelector",
"range": [
469,
484
],
"loc": {
"start": {
"line": 9,
"column": 89
},
"end": {
"line": 9,
"column": 104
}
}
}
],
"range": [
401,
485
],
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 105
}
}
}
],
"range": [
391,
486
],
"loc": {
"start": {
"line": 9,
"column": 11
},
"end": {
"line": 9,
"column": 106
}
}
},
"range": [
384,
487
],
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 107
}
}
}
],
"range": [
378,
489
],
"loc": {
"start": {
"line": 8,
"column": 89
},
"end": {
"line": 10,
"column": 1
}
}
},
"generator": false,
"expression": false,
"range": [
296,
489
],
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 10,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": " tslint:disable:max-line-length ",
"range": [
252,
288
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 36
}
}
}
],
"trailingComments": []
},
"specifiers": [],
"source": null,
"range": [
289,
489
],
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 10,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": " tslint:disable:max-line-length ",
"range": [
252,
288
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 36
}
}
}
]
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "GroupByOperator",
"range": [
494,
509
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 19
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "GroupByOperator",
"range": [
540,
555
],
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 28
}
}
},
"params": [
{
"type": "Identifier",
"name": "keySelector",
"range": [
556,
567
],
"loc": {
"start": {
"line": 12,
"column": 29
},
"end": {
"line": 12,
"column": 40
}
}
},
{
"type": "Identifier",
"name": "elementSelector",
"range": [
569,
584
],
"loc": {
"start": {
"line": 12,
"column": 42
},
"end": {
"line": 12,
"column": 57
}
}
},
{
"type": "Identifier",
"name": "durationSelector",
"range": [
586,
602
],
"loc": {
"start": {
"line": 12,
"column": 59
},
"end": {
"line": 12,
"column": 75
}
}
},
{
"type": "Identifier",
"name": "subjectSelector",
"range": [
604,
619
],
"loc": {
"start": {
"line": 12,
"column": 77
},
"end": {
"line": 12,
"column": 92
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
631,
635
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "keySelector",
"range": [
636,
647
],
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 24
}
}
},
"range": [
631,
647
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 24
}
}
},
"right": {
"type": "Identifier",
"name": "keySelector",
"range": [
650,
661
],
"loc": {
"start": {
"line": 13,
"column": 27
},
"end": {
"line": 13,
"column": 38
}
}
},
"range": [
631,
661
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 38
}
}
},
"range": [
631,
662
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 39
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
671,
675
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "elementSelector",
"range": [
676,
691
],
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 14,
"column": 28
}
}
},
"range": [
671,
691
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 28
}
}
},
"right": {
"type": "Identifier",
"name": "elementSelector",
"range": [
694,
709
],
"loc": {
"start": {
"line": 14,
"column": 31
},
"end": {
"line": 14,
"column": 46
}
}
},
"range": [
671,
709
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 46
}
}
},
"range": [
671,
710
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 47
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
719,
723
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "durationSelector",
"range": [
724,
740
],
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 29
}
}
},
"range": [
719,
740
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 29
}
}
},
"right": {
"type": "Identifier",
"name": "durationSelector",
"range": [
743,
759
],
"loc": {
"start": {
"line": 15,
"column": 32
},
"end": {
"line": 15,
"column": 48
}
}
},
"range": [
719,
759
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 48
}
}
},
"range": [
719,
760
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 49
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
769,
773
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "subjectSelector",
"range": [
774,
789
],
"loc": {
"start": {
"line": 16,
"column": 13
},
"end": {
"line": 16,
"column": 28
}
}
},
"range": [
769,
789
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 28
}
}
},
"right": {
"type": "Identifier",
"name": "subjectSelector",
"range": [
792,
807
],
"loc": {
"start": {
"line": 16,
"column": 31
},
"end": {
"line": 16,
"column": 46
}
}
},
"range": [
769,
807
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 46
}
}
},
"range": [
769,
808
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 47
}
}
}
],
"range": [
621,
814
],
"loc": {
"start": {
"line": 12,
"column": 94
},
"end": {
"line": 17,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
531,
814
],
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 17,
"column": 5
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "GroupByOperator",
"range": [
819,
834
],
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "prototype",
"range": [
835,
844
],
"loc": {
"start": {
"line": 18,
"column": 20
},
"end": {
"line": 18,
"column": 29
}
}
},
"range": [
819,
844
],
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 29
}
}
},
"property": {
"type": "Identifier",
"name": "call",
"range": [
845,
849
],
"loc": {
"start": {
"line": 18,
"column": 30
},
"end": {
"line": 18,
"column": 34
}
}
},
"range": [
819,
849
],
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 34
}
}
},
"right": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "subscriber",
"range": [
862,
872
],
"loc": {
"start": {
"line": 18,
"column": 47
},
"end": {
"line": 18,
"column": 57
}
}
},
{
"type": "Identifier",
"name": "source",
"range": [
874,
880
],
"loc": {
"start": {
"line": 18,
"column": 59
},
"end": {
"line": 18,
"column": 65
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "source",
"range": [
899,
905
],
"loc": {
"start": {
"line": 19,
"column": 15
},
"end": {
"line": 19,
"column": 21
}
}
},
"property": {
"type": "Identifier",