@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,468 lines (1,467 loc) • 845 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,
80
],
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 36
}
}
}
],
"range": [
53,
81
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 37
}
}
},
"range": [
48,
81
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 37
}
}
}
],
"kind": "var",
"range": [
44,
82
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 38
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "BehaviorSubject",
"range": [
87,
102
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 19
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
105,
107
],
"loc": {
"start": {
"line": 4,
"column": 22
},
"end": {
"line": 4,
"column": 24
}
}
},
"property": {
"type": "Identifier",
"name": "BehaviorSubject",
"range": [
108,
123
],
"loc": {
"start": {
"line": 4,
"column": 25
},
"end": {
"line": 4,
"column": 40
}
}
},
"range": [
105,
123
],
"loc": {
"start": {
"line": 4,
"column": 22
},
"end": {
"line": 4,
"column": 40
}
}
},
"range": [
87,
123
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 40
}
}
}
],
"kind": "var",
"range": [
83,
124
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 41
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Observable",
"range": [
129,
139
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 14
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
142,
144
],
"loc": {
"start": {
"line": 5,
"column": 17
},
"end": {
"line": 5,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "Observable",
"range": [
145,
155
],
"loc": {
"start": {
"line": 5,
"column": 20
},
"end": {
"line": 5,
"column": 30
}
}
},
"range": [
142,
155
],
"loc": {
"start": {
"line": 5,
"column": 17
},
"end": {
"line": 5,
"column": 30
}
}
},
"range": [
129,
155
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 30
}
}
}
],
"kind": "var",
"range": [
125,
156
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 31
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "ObjectUnsubscribedError",
"range": [
161,
184
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 27
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
187,
189
],
"loc": {
"start": {
"line": 6,
"column": 30
},
"end": {
"line": 6,
"column": 32
}
}
},
"property": {
"type": "Identifier",
"name": "ObjectUnsubscribedError",
"range": [
190,
213
],
"loc": {
"start": {
"line": 6,
"column": 33
},
"end": {
"line": 6,
"column": 56
}
}
},
"range": [
187,
213
],
"loc": {
"start": {
"line": 6,
"column": 30
},
"end": {
"line": 6,
"column": 56
}
}
},
"range": [
161,
213
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 56
}
}
}
],
"kind": "var",
"range": [
157,
214
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 57
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {BehaviorSubject} ",
"range": [
215,
245
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 30
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
246,
254
],
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "BehaviorSubject",
"raw": "'BehaviorSubject'",
"range": [
255,
272
],
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 26
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
292,
294
],
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 6
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should extend Subject",
"raw": "'should extend Subject'",
"range": [
295,
318
],
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 30
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "done",
"range": [
330,
334
],
"loc": {
"start": {
"line": 9,
"column": 42
},
"end": {
"line": 9,
"column": 46
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "subject",
"range": [
350,
357
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 19
}
}
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "BehaviorSubject",
"range": [
364,
379
],
"loc": {
"start": {
"line": 10,
"column": 26
},
"end": {
"line": 10,
"column": 41
}
}
},
"arguments": [
{
"type": "Literal",
"value": null,
"raw": "null",
"range": [
380,
384
],
"loc": {
"start": {
"line": 10,
"column": 42
},
"end": {
"line": 10,
"column": 46
}
}
}
],
"range": [
360,
385
],
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 47
}
}
},
"range": [
350,
385
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 47
}
}
}
],
"kind": "var",
"range": [
346,
386
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 48
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "chai_1",
"range": [
395,
401
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 14
}
}
},
"property": {
"type": "Identifier",
"name": "expect",
"range": [
402,
408
],
"loc": {
"start": {
"line": 11,
"column": 15
},
"end": {
"line": 11,
"column": 21
}
}
},
"range": [
395,
408
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 21
}
}
},
"arguments": [
{
"type": "BinaryExpression",
"operator": "instanceof",
"left": {
"type": "Identifier",
"name": "subject",
"range": [
409,
416
],
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 29
}
}
},
"right": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
428,
430
],
"loc": {
"start": {
"line": 11,
"column": 41
},
"end": {
"line": 11,
"column": 43
}
}
},
"property": {
"type": "Identifier",
"name": "Subject",
"range": [
431,
438
],
"loc": {
"start": {
"line": 11,
"column": 44
},
"end": {
"line": 11,
"column": 51
}
}
},
"range": [
428,
438
],
"loc": {
"start": {
"line": 11,
"column": 41
},
"end": {
"line": 11,
"column": 51
}
}
},
"range": [
409,
438
],
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 51
}
}
}
],
"range": [
395,
439
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 52
}
}
},
"property": {
"type": "Identifier",
"name": "to",
"range": [
440,
442
],
"loc": {
"start": {
"line": 11,
"column": 53
},
"end": {
"line": 11,
"column": 55
}
}
},
"range": [
395,
442
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 55
}
}
},
"property": {
"type": "Identifier",
"name": "be",
"range": [
443,
445
],
"loc": {
"start": {
"line": 11,
"column": 56
},
"end": {
"line": 11,
"column": 58
}
}
},
"range": [
395,
445
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 58
}
}
},
"property": {
"type": "Identifier",
"name": "true",
"range": [
446,
450
],
"loc": {
"start": {
"line": 11,
"column": 59
},
"end": {
"line": 11,
"column": 63
}
}
},
"range": [
395,
450
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 63
}
}
},
"range": [
395,
451
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 64
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "done",
"range": [
460,
464
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 12
}
}
},
"arguments": [],
"range": [
460,
466
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 14
}
}
},
"range": [
460,
467
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 15
}
}
}
],
"range": [
336,
473
],
"loc": {
"start": {
"line": 9,
"column": 48
},
"end": {
"line": 13,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
320,
473
],
"loc": {
"start": {
"line": 9,
"column": 32
},
"end": {
"line": 13,
"column": 5
}
}
}
],
"range": [
292,
474
],
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 13,
"column": 6
}
},
"_esdocTestId": 2425,
"_esdocTestName": "it2425"
},
"range": [
292,
475
],
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 13,
"column": 7
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
480,
482
],
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 6
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should throw if it has received an error and getValue() is called",
"raw": "'should throw if it has received an error and getValue() is called'",
"range": [
483,
550
],
"loc": {
"start": {
"line": 14,
"column": 7
},
"end": {
"line": 14,
"column": 74
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "subject",
"range": [
578,
585
],
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 19
}
}
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "BehaviorSubject",
"range": [
592,
607
],
"loc": {
"start": {
"line": 15,
"column": 26
},
"end": {
"line": 15,
"column": 41
}
}
},
"arguments": [
{
"type": "Literal",
"value": null,
"raw": "null",
"range": [
608,
612
],
"loc": {
"start": {
"line": 15,
"column": 42
},
"end": {
"line": 15,
"column": 46
}
}
}
],
"range": [
588,
613
],
"loc": {
"start": {
"line": 15,
"column": 22
},
"end": {
"line": 15,
"column": 47
}
}
},
"range": [
578,
613
],
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 47
}
}
}
],
"kind": "var",
"range": [
574,
614
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 48
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "subject",
"range": [
623,
630
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"name": "error",
"range": [
631,
636
],
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 21
}
}
},
"range": [
623,
636
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 21
}
}
},
"arguments": [
{
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error",