@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,323 lines • 1.28 MB
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": "Observable",
"range": [
87,
97
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 14
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
100,
102
],
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "Observable",
"range": [
103,
113
],
"loc": {
"start": {
"line": 4,
"column": 20
},
"end": {
"line": 4,
"column": 30
}
}
},
"range": [
100,
113
],
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 30
}
}
},
"range": [
87,
113
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 30
}
}
}
],
"kind": "var",
"range": [
83,
114
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 31
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {retryWhen} ",
"range": [
115,
139
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 24
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
140,
148
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.retryWhen",
"raw": "'Observable.prototype.retryWhen'",
"range": [
149,
181
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 41
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
201,
210
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "retryWhen",
"raw": "'retryWhen'",
"range": [
211,
222
],
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 25
}
}
}
],
"range": [
201,
223
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 26
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should handle a source with eventual error using a hot notifier",
"raw": "'should handle a source with eventual error using a hot notifier'",
"range": [
224,
289
],
"loc": {
"start": {
"line": 7,
"column": 27
},
"end": {
"line": 7,
"column": 92
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "source",
"range": [
317,
323
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 18
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
326,
330
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 25
}
}
},
"arguments": [
{
"type": "Literal",
"value": "-1--2--#",
"raw": "'-1--2--#'",
"range": [
331,
341
],
"loc": {
"start": {
"line": 8,
"column": 26
},
"end": {
"line": 8,
"column": 36
}
}
}
],
"range": [
326,
342
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 37
}
}
},
"range": [
317,
342
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 37
}
}
}
],
"kind": "var",
"range": [
313,
343
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 38
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "subs",
"range": [
356,
360
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 16
}
}
},
"init": {
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "^ ! ",
"raw": "'^ ! '",
"range": [
364,
395
],
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 51
}
}
},
{
"type": "Literal",
"value": " ^ ! ",
"raw": "' ^ ! '",
"range": [
409,
440
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 43
}
}
},
{
"type": "Literal",
"value": " ^ !",
"raw": "' ^ !'",
"range": [
454,
485
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 43
}
}
}
],
"range": [
363,
486
],
"loc": {
"start": {
"line": 9,
"column": 19
},
"end": {
"line": 11,
"column": 44
}
}
},
"range": [
356,
486
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 11,
"column": 44
}
}
}
],
"kind": "var",
"range": [
352,
487
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 11,
"column": 45
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "notifier",
"range": [
500,
508
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 20
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
511,
514
],
"loc": {
"start": {
"line": 12,
"column": 23
},
"end": {
"line": 12,
"column": 26
}
}
},
"arguments": [
{
"type": "Literal",
"value": "-------------r------------r-|",
"raw": "'-------------r------------r-|'",
"range": [
515,
546
],
"loc": {
"start": {
"line": 12,
"column": 27
},
"end": {
"line": 12,
"column": 58
}
}
}
],
"range": [
511,
547
],
"loc": {
"start": {
"line": 12,
"column": 23
},
"end": {
"line": 12,
"column": 59
}
}
},
"range": [
500,
547
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 59
}
}
}
],
"kind": "var",
"range": [
496,
548
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 60
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
561,
569
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "-1--2---------1--2---------1|",
"raw": "'-1--2---------1--2---------1|'",
"range": [
572,
603
],
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 13,
"column": 54
}
}
},
"range": [
561,
603
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 54
}
}
}
],
"kind": "var",
"range": [
557,
604
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 55
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "result",
"range": [
617,
623
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 18
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "source",
"range": [
626,
632
],
"loc": {
"start": {
"line": 14,
"column": 21
},
"end": {
"line": 14,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "retryWhen",
"range": [
633,
642
],
"loc": {
"start": {
"line": 14,
"column": 28
},
"end": {
"line": 14,
"column": 37
}
}
},
"range": [
626,
642
],
"loc": {
"start": {
"line": 14,
"column": 21
},
"end": {
"line": 14,
"column": 37
}
}
},
"arguments": [
{
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "errors",
"range": [
653,
659
],
"loc": {
"start": {
"line": 14,
"column": 48
},
"end": {
"line": 14,
"column": 54
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "Identifier",
"name": "notifier",
"range": [
670,
678
],
"loc": {
"start": {
"line": 14,
"column": 65
},
"end": {
"line": 14,
"column": 73
}
}
},
"range": [
663,
679
],
"loc": {
"start": {
"line": 14,
"column": 58
},
"end": {
"line": 14,
"column": 74
}
}
}
],
"range": [
661,
681
],
"loc": {
"start": {
"line": 14,
"column": 56
},
"end": {
"line": 14,
"column": 76
}
}
},
"generator": false,
"expression": false,
"range": [
643,
681
],
"loc": {
"start": {
"line": 14,
"column": 38
},
"end": {
"line": 14,
"column": 76
}
}
}
],
"range": [
626,
682
],
"loc": {
"start": {
"line": 14,
"column": 21
},
"end": {
"line": 14,
"column": 77
}
}
},
"range": [
617,
682
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 77
}
}
}
],
"kind": "var",
"range": [
613,
683
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 78
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
692,
708
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 24
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "result",
"range": [
709,
715
],
"loc": {
"start": {
"line": 15,
"column": 25
},
"end": {
"line": 15,
"column": 31
}
}
}
],
"range": [
692,
716
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 32
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
717,
721
],
"loc": {
"start": {
"line": 15,
"column": 33
},
"end": {
"line": 15,
"column": 37
}
}
},
"range": [
692,
721
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 37
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "expected",
"range": [
722,
730
],
"loc": {
"start": {
"line": 15,
"column": 38
},
"end": {
"line": 15,
"column": 46
}
}
}
],
"range": [
692,
731
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 47
}
}
},
"range": [
692,
732
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 48
}
}
},
{
"type": "ExpressionStatement",
"express