@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,199 lines (1,198 loc) • 402 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 {timer} ",
"range": [
85,
105
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 20
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
106,
114
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.timer",
"raw": "'Observable.timer'",
"range": [
115,
133
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 27
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
153,
162
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "timer(3000, 1000)",
"raw": "'timer(3000, 1000)'",
"range": [
163,
182
],
"loc": {
"start": {
"line": 6,
"column": 14
},
"end": {
"line": 6,
"column": 33
}
}
}
],
"range": [
153,
183
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 34
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should create an observable emitting periodically",
"raw": "'should create an observable emitting periodically'",
"range": [
184,
235
],
"loc": {
"start": {
"line": 6,
"column": 35
},
"end": {
"line": 6,
"column": 86
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
263,
265
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Observable",
"range": [
268,
278
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "timer",
"range": [
279,
284
],
"loc": {
"start": {
"line": 7,
"column": 28
},
"end": {
"line": 7,
"column": 33
}
}
},
"range": [
268,
284
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 33
}
}
},
"arguments": [
{
"type": "Literal",
"value": 60,
"raw": "60",
"range": [
285,
287
],
"loc": {
"start": {
"line": 7,
"column": 34
},
"end": {
"line": 7,
"column": 36
}
}
},
{
"type": "Literal",
"value": 20,
"raw": "20",
"range": [
289,
291
],
"loc": {
"start": {
"line": 7,
"column": 38
},
"end": {
"line": 7,
"column": 40
}
}
},
{
"type": "Identifier",
"name": "rxTestScheduler",
"range": [
293,
308
],
"loc": {
"start": {
"line": 7,
"column": 42
},
"end": {
"line": 7,
"column": 57
}
}
}
],
"range": [
268,
309
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 58
}
}
},
"property": {
"type": "Identifier",
"name": "take",
"range": [
323,
327
],
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 17
}
}
},
"range": [
268,
327
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 8,
"column": 17
}
}
},
"arguments": [
{
"type": "Literal",
"value": 4,
"raw": "4",
"range": [
328,
329
],
"loc": {
"start": {
"line": 8,
"column": 18
},
"end": {
"line": 8,
"column": 19
}
}
}
],
"range": [
268,
330
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 8,
"column": 20
}
},
"trailingComments": [
{
"type": "Line",
"value": " make it actually finite, so it can be rendered",
"range": [
331,
380
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 70
}
}
}
]
},
"property": {
"type": "Identifier",
"name": "concat",
"range": [
394,
400
],
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 19
}
},
"leadingComments": [
{
"type": "Line",
"value": " make it actually finite, so it can be rendered",
"range": [
331,
380
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 70
}
}
}
]
},
"range": [
268,
400
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 9,
"column": 19
}
}
},
"arguments": [
{
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Observable",
"range": [
401,
411
],
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 30
}
}
},
"property": {
"type": "Identifier",
"name": "never",
"range": [
412,
417
],
"loc": {
"start": {
"line": 9,
"column": 31
},
"end": {
"line": 9,
"column": 36
}
}
},
"range": [
401,
417
],
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 36
}
}
},
"arguments": [],
"range": [
401,
419
],
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 38
}
}
}
],
"range": [
268,
420
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 9,
"column": 39
}
}
},
"range": [
263,
420
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 9,
"column": 39
}
}
}
],
"kind": "var",
"range": [
259,
421
],
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 9,
"column": 40
}
},
"trailingComments": [
{
"type": "Line",
"value": " but pretend it's infinite by not completing",
"range": [
422,
468
],
"loc": {
"start": {
"line": 9,
"column": 41
},
"end": {
"line": 9,
"column": 87
}
}
}
]
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
481,
489
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "------a-b-c-d-",
"raw": "'------a-b-c-d-'",
"range": [
492,
508
],
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 39
}
}
},
"range": [
481,
508
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 39
}
}
}
],
"kind": "var",
"range": [
477,
509
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 40
}
},
"leadingComments": [
{
"type": "Line",
"value": " but pretend it's infinite by not completing",
"range": [
422,
468
],
"loc": {
"start": {
"line": 9,
"column": 41
},
"end": {
"line": 9,
"column": 87
}
}
}
]
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "values",
"range": [
522,
528
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 18
}
}
},
"init": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "a",
"range": [
545,
546
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 13
}
}
},
"value": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
548,
549
],
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 12,
"column": 16
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
545,
549
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 16
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "b",
"range": [
563,
564
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 13
}
}
},
"value": {
"type": "Literal",
"value": 1,
"raw": "1",
"range": [
566,
567
],
"loc": {
"start": {
"line": 13,
"column": 15
},
"end": {
"line": 13,
"column": 16
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
563,
567
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 16
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "c",
"range": [
581,
582
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 13
}
}
},
"value": {
"type": "Literal",
"value": 2,
"raw": "2",
"range": [
584,
585
],
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 16
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
581,
585
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 16
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "d",
"range": [
599,
600
],
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 13
}
}
},
"value": {
"type": "Literal",
"value": 3,
"raw": "3",
"range": [
602,
603
],
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 16
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [