@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,223 lines (1,222 loc) • 581 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": "Rx",
"range": [
18,
20
],
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 6
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
23,
30
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 16
}
}
},
"arguments": [
{
"type": "Literal",
"value": "../../dist/cjs/Rx",
"raw": "'../../dist/cjs/Rx'",
"range": [
31,
50
],
"loc": {
"start": {
"line": 2,
"column": 17
},
"end": {
"line": 2,
"column": 36
}
}
}
],
"range": [
23,
51
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 37
}
}
},
"range": [
18,
51
],
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 37
}
}
}
],
"kind": "var",
"range": [
14,
52
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 38
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Observable",
"range": [
57,
67
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 14
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
70,
72
],
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "Observable",
"range": [
73,
83
],
"loc": {
"start": {
"line": 3,
"column": 20
},
"end": {
"line": 3,
"column": 30
}
}
},
"range": [
70,
83
],
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 30
}
}
},
"range": [
57,
83
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 30
}
}
}
],
"kind": "var",
"range": [
53,
84
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 31
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {timeInterval} ",
"range": [
85,
112
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 27
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
113,
121
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.timeInterval",
"raw": "'Observable.prototype.timeInterval'",
"range": [
122,
157
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 44
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
177,
186
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "timeInterval",
"raw": "'timeInterval'",
"range": [
187,
201
],
"loc": {
"start": {
"line": 6,
"column": 14
},
"end": {
"line": 6,
"column": 28
}
}
}
],
"range": [
177,
202
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 29
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should record the time interval between source elements",
"raw": "'should record the time interval between source elements'",
"range": [
203,
260
],
"loc": {
"start": {
"line": 6,
"column": 30
},
"end": {
"line": 6,
"column": 87
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
288,
290
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
293,
296
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--a--^b-c-----d--e--|",
"raw": "'--a--^b-c-----d--e--|'",
"range": [
297,
320
],
"loc": {
"start": {
"line": 7,
"column": 21
},
"end": {
"line": 7,
"column": 44
}
}
}
],
"range": [
293,
321
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 45
}
}
},
"range": [
288,
321
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 45
}
}
}
],
"kind": "var",
"range": [
284,
322
],
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 46
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1subs",
"range": [
335,
341
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 18
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
344,
362
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 39
}
}
},
"range": [
335,
362
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 39
}
}
}
],
"kind": "var",
"range": [
331,
363
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 40
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
376,
384
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "-w-x-----y--z--|",
"raw": "'-w-x-----y--z--|'",
"range": [
387,
405
],
"loc": {
"start": {
"line": 9,
"column": 23
},
"end": {
"line": 9,
"column": 41
}
}
},
"range": [
376,
405
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 41
}
}
}
],
"kind": "var",
"range": [
372,
406
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 42
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expectedValue",
"range": [
419,
432
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 25
}
}
},
"init": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "w",
"range": [
437,
438
],
"loc": {
"start": {
"line": 10,
"column": 30
},
"end": {
"line": 10,
"column": 31
}
}
},
"value": {
"type": "Literal",
"value": 10,
"raw": "10",
"range": [
440,
442
],
"loc": {
"start": {
"line": 10,
"column": 33
},
"end": {
"line": 10,
"column": 35
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
437,
442
],
"loc": {
"start": {
"line": 10,
"column": 30
},
"end": {
"line": 10,
"column": 35
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "x",
"range": [
444,
445
],
"loc": {
"start": {
"line": 10,
"column": 37
},
"end": {
"line": 10,
"column": 38
}
}
},
"value": {
"type": "Literal",
"value": 20,
"raw": "20",
"range": [
447,
449
],
"loc": {
"start": {
"line": 10,
"column": 40
},
"end": {
"line": 10,
"column": 42
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
444,
449
],
"loc": {
"start": {
"line": 10,
"column": 37
},
"end": {
"line": 10,
"column": 42
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "y",
"range": [
451,
452
],
"loc": {
"start": {
"line": 10,
"column": 44
},
"end": {
"line": 10,
"column": 45
}
}
},
"value": {
"type": "Literal",
"value": 60,
"raw": "60",
"range": [
454,
456
],
"loc": {
"start": {
"line": 10,
"column": 47
},
"end": {
"line": 10,
"column": 49
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
451,
456
],
"loc": {
"start": {
"line": 10,
"column": 44
},
"end": {
"line": 10,
"column": 49
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "z",
"range": [
458,
459
],
"loc": {
"start": {
"line": 10,
"column": 51
},
"end": {
"line": 10,
"column": 52
}
}
},
"value": {
"type": "Literal",
"value": 30,
"raw": "30",
"range": [
461,
463
],
"loc": {
"start": {
"line": 10,
"column": 54
},
"end": {
"line": 10,
"column": 56
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
458,
463
],
"loc": {
"start": {
"line": 10,
"column": 51
},
"end": {
"line": 10,
"column": 56
}
}
}
],
"range": [
435,
465
],
"loc": {
"start": {
"line": 10,
"column": 28
},
"end": {
"line": 10,
"column": 58
}
}
},
"range": [
419,
465
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 58
}
}
}
],
"kind": "var",
"range": [
415,
466
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 59
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "result",
"range": [
479,
485
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 18
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
488,
490
],
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"name": "timeInterval",
"range": [
491,
503
],
"loc": {
"start": {
"line": 11,
"column": 24
},
"end": {
"line": 11,
"column": 36
}
}
},
"range": [
488,
503
],
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 36
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "rxTestScheduler",
"range": [
504,
519
],
"loc": {
"start": {
"line": 11,
"column": 37
},
"end": {
"line": 11,
"column": 52
}
}
}
],
"range": [
488,
520
],
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 53
}
}
},
"property": {
"type": "Identifier",
"name": "map",
"range": [
534,
537
],
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 16
}
}
},
"range": [
488,
537
],
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 12,
"column": 16
}
}
},
"arguments": [
{
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "x",
"range": [
548,
549
],
"loc": {
"start": {
"line": 12,
"column": 27
},
"end": {
"line": 12,
"column": 28
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "x",
"range": [
560,
561
],
"loc": {
"start": {
"line": 12,
"column": 39
},
"end": {
"line": 12,
"column": 40
}
}
},
"property": {
"type": "Identifier",
"name": "interval",
"range": [
562,
570
],
"loc": {
"start": {
"line": 12,
"column": 41
},
"end": {
"line": 12,
"column": 49
}
}
},
"range": [
560,
570
],
"loc": {
"start": {
"line": 12,
"column": 39
},
"end": {
"line": 12,
"column": 49
}
}
},
"range": [
553,
571
],
"loc": {
"start": {
"line": 12,