@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,260 lines (1,259 loc) • 664 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "Literal",
"value": "use strict",
"raw": "\"use strict\"",
"range": [
0,
12
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 12
}
}
},
"range": [
0,
13
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 13
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "chai_1",
"range": [
18,
24
],
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 10
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
27,
34
],
"loc": {
"start": {
"line": 2,
"column": 13
},
"end": {
"line": 2,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "chai",
"raw": "'chai'",
"range": [
35,
41
],
"loc": {
"start": {
"line": 2,
"column": 21
},
"end": {
"line": 2,
"column": 27
}
}
}
],
"range": [
27,
42
],
"loc": {
"start": {
"line": 2,
"column": 13
},
"end": {
"line": 2,
"column": 28
}
}
},
"range": [
18,
42
],
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 28
}
}
}
],
"kind": "var",
"range": [
14,
43
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 29
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Rx",
"range": [
48,
50
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 6
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
53,
60
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 16
}
}
},
"arguments": [
{
"type": "Literal",
"value": "../dist/cjs/Rx",
"raw": "'../dist/cjs/Rx'",
"range": [
61,
77
],
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 33
}
}
}
],
"range": [
53,
78
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 34
}
}
},
"range": [
48,
78
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 34
}
}
}
],
"kind": "var",
"range": [
44,
79
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 35
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Observable",
"range": [
84,
94
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 14
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
97,
99
],
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "Observable",
"range": [
100,
110
],
"loc": {
"start": {
"line": 4,
"column": 20
},
"end": {
"line": 4,
"column": 30
}
}
},
"range": [
97,
110
],
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 30
}
}
},
"range": [
84,
110
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 30
}
}
}
],
"kind": "var",
"range": [
80,
111
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 31
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Subscription",
"range": [
116,
128
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 16
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
131,
133
],
"loc": {
"start": {
"line": 5,
"column": 19
},
"end": {
"line": 5,
"column": 21
}
}
},
"property": {
"type": "Identifier",
"name": "Subscription",
"range": [
134,
146
],
"loc": {
"start": {
"line": 5,
"column": 22
},
"end": {
"line": 5,
"column": 34
}
}
},
"range": [
131,
146
],
"loc": {
"start": {
"line": 5,
"column": 19
},
"end": {
"line": 5,
"column": 34
}
}
},
"range": [
116,
146
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 34
}
}
}
],
"kind": "var",
"range": [
112,
147
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 35
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {Subscription} ",
"range": [
148,
175
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 27
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
176,
184
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Subscription",
"raw": "'Subscription'",
"range": [
185,
199
],
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 23
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
219,
221
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 6
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should not leak",
"raw": "'should not leak'",
"range": [
222,
239
],
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 24
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "done",
"range": [
251,
255
],
"loc": {
"start": {
"line": 8,
"column": 36
},
"end": {
"line": 8,
"column": 40
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "tearDowns",
"range": [
271,
280
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 21
}
}
},
"init": {
"type": "ArrayExpression",
"elements": [],
"range": [
283,
285
],
"loc": {
"start": {
"line": 9,
"column": 24
},
"end": {
"line": 9,
"column": 26
}
}
},
"range": [
271,
285
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 26
}
}
}
],
"kind": "var",
"range": [
267,
286
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 27
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "source1",
"range": [
299,
306
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 19
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Observable",
"range": [
309,
319
],
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 32
}
}
},
"property": {
"type": "Identifier",
"name": "create",
"range": [
320,
326
],
"loc": {
"start": {
"line": 10,
"column": 33
},
"end": {
"line": 10,
"column": 39
}
}
},
"range": [
309,
326
],
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 39
}
}
},
"arguments": [
{
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "observer",
"range": [
337,
345
],
"loc": {
"start": {
"line": 10,
"column": 50
},
"end": {
"line": 10,
"column": 58
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "tearDowns",
"range": [
398,
407
],
"loc": {
"start": {
"line": 12,
"column": 16
},
"end": {
"line": 12,
"column": 25
}
}
},
"property": {
"type": "Identifier",
"name": "push",
"range": [
408,
412
],
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 30
}
}
},
"range": [
398,
412
],
"loc": {
"start": {
"line": 12,
"column": 16
},
"end": {
"line": 12,
"column": 30
}
}
},
"arguments": [
{
"type": "Literal",
"value": 1,
"raw": "1",
"range": [
413,
414
],
"loc": {
"start": {
"line": 12,
"column": 31
},
"end": {
"line": 12,
"column": 32
}
}
}
],
"range": [
398,
415
],
"loc": {
"start": {
"line": 12,
"column": 16
},
"end": {
"line": 12,
"column": 33
}
}
},
"range": [
398,
416
],
"loc": {
"start": {
"line": 12,
"column": 16
},
"end": {
"line": 12,
"column": 34
}
}
}
],
"range": [
380,
430
],
"loc": {
"start": {
"line": 11,
"column": 31
},
"end": {
"line": 13,
"column": 13
}
}
},
"generator": false,
"expression": false,
"range": [
368,
430
],
"loc": {
"start": {
"line": 11,
"column": 19
},
"end": {
"line": 13,
"column": 13
}
}
},
"range": [
361,
431
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 13,
"column": 14
}
}
}
],
"range": [
347,
441
],
"loc": {
"start": {
"line": 10,
"column": 60
},
"end": {
"line": 14,
"column": 9
}
}
},
"generator": false,
"expression": false,
"range": [
327,
441
],
"loc": {
"start": {
"line": 10,
"column": 40
},
"end": {
"line": 14,
"column": 9
}
}
}
],
"range": [
309,
442
],
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 14,
"column": 10
}
}
},
"range": [
299,
442
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 14,
"column": 10
}
}
}
],
"kind": "var",
"range": [
295,
443
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 14,
"column": 11
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "source2",
"range": [
456,
463
],
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 19
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Observable",
"range": [
466,
476
],
"loc": {
"start": {
"line": 15,
"column": 22
},
"end": {
"line": 15,
"column": 32
}
}
},
"property": {
"type": "Identifier",
"name": "create",
"range": [
477,
483
],
"loc": {
"start": {
"line": 15,
"column": 33
},
"end": {
"line": 15,
"column": 39
}
}
},
"range": [
466,
483
],
"loc": {
"start": {
"line": 15,
"column": 22
},
"end": {
"line": 15,
"column": 39
}
}
},
"arguments": [
{
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "observer",
"range": [
494,
502
],
"loc": {
"start": {
"line": 15,
"column": 50
},
"end": {
"line": 15,
"column": 58
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "tearDowns",
"range": [
555,
564
],
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 25
}
}
},
"property": {
"type": "Identifier",
"name": "push",
"range": [
565,
569
],
"loc": {
"start": {
"line": 17,
"column": 26
},
"end": {
"line": 17,
"column": 30
}
}
},
"range": [
555,
569
],
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 30
}
}
},
"arguments": [
{
"type": "Literal",
"value": 2,
"raw": "2",
"range": [
570,
571
],
"loc": {
"start": {
"line": 17,
"column": 31
},
"end": {
"line": 17,
"column": 32
}
}
}
],
"range": [
555,
572
],
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 33
}
}
},
"range": [
555,
573
],
"loc": {
"start": {
"line": 17,
"column": 16