@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,805 lines • 207 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "isArray",
"range": [
9,
16
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 16
}
}
},
"imported": {
"type": "Identifier",
"name": "isArray",
"range": [
9,
16
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 16
}
}
},
"range": [
9,
16
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 16
}
}
}
],
"source": {
"type": "Literal",
"value": "../util/isArray",
"raw": "'../util/isArray'",
"range": [
24,
41
],
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 41
}
}
},
"range": [
0,
42
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 42
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "isPromise",
"range": [
52,
61
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 18
}
}
},
"imported": {
"type": "Identifier",
"name": "isPromise",
"range": [
52,
61
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 18
}
}
},
"range": [
52,
61
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 18
}
}
}
],
"source": {
"type": "Literal",
"value": "../util/isPromise",
"raw": "'../util/isPromise'",
"range": [
69,
88
],
"loc": {
"start": {
"line": 2,
"column": 26
},
"end": {
"line": 2,
"column": 45
}
}
},
"range": [
43,
89
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 46
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "PromiseObservable",
"range": [
99,
116
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 26
}
}
},
"imported": {
"type": "Identifier",
"name": "PromiseObservable",
"range": [
99,
116
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 26
}
}
},
"range": [
99,
116
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 26
}
}
}
],
"source": {
"type": "Literal",
"value": "./PromiseObservable",
"raw": "'./PromiseObservable'",
"range": [
124,
145
],
"loc": {
"start": {
"line": 3,
"column": 34
},
"end": {
"line": 3,
"column": 55
}
}
},
"range": [
90,
146
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 56
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "IteratorObservable",
"range": [
156,
174
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 27
}
}
},
"imported": {
"type": "Identifier",
"name": "IteratorObservable",
"range": [
156,
174
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 27
}
}
},
"range": [
156,
174
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 27
}
}
}
],
"source": {
"type": "Literal",
"value": "./IteratorObservable",
"raw": "'./IteratorObservable'",
"range": [
182,
204
],
"loc": {
"start": {
"line": 4,
"column": 35
},
"end": {
"line": 4,
"column": 57
}
}
},
"range": [
147,
205
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 58
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "ArrayObservable",
"range": [
215,
230
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 24
}
}
},
"imported": {
"type": "Identifier",
"name": "ArrayObservable",
"range": [
215,
230
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 24
}
}
},
"range": [
215,
230
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 24
}
}
}
],
"source": {
"type": "Literal",
"value": "./ArrayObservable",
"raw": "'./ArrayObservable'",
"range": [
238,
257
],
"loc": {
"start": {
"line": 5,
"column": 32
},
"end": {
"line": 5,
"column": 51
}
}
},
"range": [
206,
258
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 52
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "ArrayLikeObservable",
"range": [
268,
287
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 28
}
}
},
"imported": {
"type": "Identifier",
"name": "ArrayLikeObservable",
"range": [
268,
287
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 28
}
}
},
"range": [
268,
287
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 28
}
}
}
],
"source": {
"type": "Literal",
"value": "./ArrayLikeObservable",
"raw": "'./ArrayLikeObservable'",
"range": [
295,
318
],
"loc": {
"start": {
"line": 6,
"column": 36
},
"end": {
"line": 6,
"column": 59
}
}
},
"range": [
259,
319
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 60
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "$$iterator",
"range": [
329,
339
],
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 19
}
}
},
"imported": {
"type": "Identifier",
"name": "$$iterator",
"range": [
329,
339
],
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 19
}
}
},
"range": [
329,
339
],
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 19
}
}
}
],
"source": {
"type": "Literal",
"value": "../symbol/iterator",
"raw": "'../symbol/iterator'",
"range": [
347,
367
],
"loc": {
"start": {
"line": 7,
"column": 27
},
"end": {
"line": 7,
"column": 47
}
}
},
"range": [
320,
368
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 48
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Observable",
"range": [
378,
388
],
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 19
}
}
},
"imported": {
"type": "Identifier",
"name": "Observable",
"range": [
378,
388
],
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 19
}
}
},
"range": [
378,
388
],
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 19
}
}
}
],
"source": {
"type": "Literal",
"value": "../Observable",
"raw": "'../Observable'",
"range": [
396,
411
],
"loc": {
"start": {
"line": 8,
"column": 27
},
"end": {
"line": 8,
"column": 42
}
}
},
"range": [
369,
412
],
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 43
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "ObserveOnSubscriber",
"range": [
422,
441
],
"loc": {
"start": {
"line": 9,
"column": 9
},
"end": {
"line": 9,
"column": 28
}
}
},
"imported": {
"type": "Identifier",
"name": "ObserveOnSubscriber",
"range": [
422,
441
],
"loc": {
"start": {
"line": 9,
"column": 9
},
"end": {
"line": 9,
"column": 28
}
}
},
"range": [
422,
441
],
"loc": {
"start": {
"line": 9,
"column": 9
},
"end": {
"line": 9,
"column": 28
}
}
}
],
"source": {
"type": "Literal",
"value": "../operator/observeOn",
"raw": "'../operator/observeOn'",
"range": [
449,
472
],
"loc": {
"start": {
"line": 9,
"column": 36
},
"end": {
"line": 9,
"column": 59
}
}
},
"range": [
413,
473
],
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 60
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "$$observable",
"range": [
483,
495
],
"loc": {
"start": {
"line": 10,
"column": 9
},
"end": {
"line": 10,
"column": 21
}
}
},
"imported": {
"type": "Identifier",
"name": "$$observable",
"range": [
483,
495
],
"loc": {
"start": {
"line": 10,
"column": 9
},
"end": {
"line": 10,
"column": 21
}
}
},
"range": [
483,
495
],
"loc": {
"start": {
"line": 10,
"column": 9
},
"end": {
"line": 10,
"column": 21
}
}
}
],
"source": {
"type": "Literal",
"value": "../symbol/observable",
"raw": "'../symbol/observable'",
"range": [
503,
525
],
"loc": {
"start": {
"line": 10,
"column": 29
},
"end": {
"line": 10,
"column": 51
}
}
},
"range": [
474,
526
],
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 10,
"column": 52
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "isArrayLike",
"range": [
531,
542
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 15
}
}
},
"init": {
"type": "FunctionExpression",
"id": {
"type": "Identifier",
"name": "isArrayLike",
"range": [
531,
542
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 15
}
}
},
"params": [
{
"type": "Identifier",
"name": "x",
"range": [
556,
557
],
"loc": {
"start": {
"line": 11,
"column": 29
},
"end": {
"line": 11,
"column": 30
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "LogicalExpression",
"operator": "&&",
"left": {
"type": "Identifier",
"name": "x",
"range": [
568,
569
],
"loc": {
"start": {
"line": 11,
"column": 41
},
"end": {
"line": 11,
"column": 42
}
}
},
"right": {
"type": "BinaryExpression",
"operator": "===",
"left": {
"type": "UnaryExpression",
"operator": "typeof",
"argument": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "x",
"range": [
580,
581
],
"loc": {
"start": {
"line": 11,
"column": 53
},
"end": {
"line": 11,
"column": 54
}
}
},
"property": {
"type": "Identifier",
"name": "length",
"range": [
582,
588
],
"loc": {
"start": {
"line": 11,
"column": 55
},
"end": {
"line": 11,
"column": 61
}
}
},
"range": [
580,
588
],
"loc": {
"start": {
"line": 11,
"column": 53
},
"end": {
"line": 11,
"column": 61
}
}
},
"prefix": true,
"range": [
573,
588
],
"loc": {
"start": {
"line": 11,
"column": 46
},
"end": {
"line": 11,
"column": 61
}
}
},
"right": {
"type": "Literal",
"value": "number",
"raw": "'number'",
"range": [
593,
601
],
"loc": {
"start": {
"line": 11,
"column": 66
},
"end": {
"line": 11,
"column": 74
}
}
},
"range": [
573,
601
],
"loc": {
"start": {
"line": 11,
"column": 46
},
"end": {
"line": 11,
"column": 74
}
}
},
"range": [
568,
601
],
"loc": {
"start": {
"line": 11,
"column": 41
},
"end": {
"line": 11,
"column": 74
}
}
},
"range": [
561,
602
],
"loc": {
"start": {
"line": 11,
"column": 34
},
"end": {
"line": 11,
"column": 75
}
}
}
],
"range": [
559,
604
],
"loc": {
"start": {
"line": 11,
"column": 32
},
"end": {
"line": 11,
"column": 77
}
}
},
"generator": false,
"expression": false,
"range": [
546,
604
],
"loc": {
"start": {
"line": 11,
"column": 19
},
"end": {
"line": 11,
"column": 77
}
}
},
"range": [
531,
605
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 78
}
}
}
],
"kind": "var",
"range": [
527,
606
],
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 11,
"column": 79
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n ",
"range": [
607,
701
],
"loc": {
"start": {
"line": 12,
"column": 0
},
"end": {
"line": 16,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "FromObservable",
"range": [
713,
727
],
"loc": {
"start": {
"line": 17,
"column": 11
},
"end": {
"line": 17,
"column": 25
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "_super",
"range": [
741,
747
],
"loc": {
"start": {
"line": 17,
"column": 39
},
"end": {
"line": 17,
"column": 45
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "__extends",
"range": [
755,
764
],
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 13
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "FromObservable",
"range": [
765,
779
],
"loc": {
"start": {
"line": 18,
"column": 14
},
"end": {
"line": 18,
"column": 28
}
}
},
{
"type": "Identifier",
"name": "_super",
"range": [
781,
787
],
"loc": {
"start": {
"line": 18,
"column": 30
},
"end": {
"line": 18,
"column": 36
}
}
}
],
"range": [
755,
788
],
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 37
}
}
},
"range": [
755,
789
],
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 38
}
}
},
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "FromObservable",
"range": [
803,
817
],
"loc": {
"start": {
"line": 19,
"column": 13
},
"end": {
"line": 19,
"column": 27
}
}
},
"params": [
{
"type": "Identifier",
"name": "ish",
"range": [
818,
821
],
"loc": {
"start": {
"line": 19,
"column": 28
},
"end": {
"line": 19,
"column": 31
}
}
},
{
"type": "Identifier",
"name": "scheduler",
"range": [
823,
832
],
"loc": {
"start": {
"line": 19,
"column": 33
},
"end": {
"line": 19,
"column": 42
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "_super",
"range": [
844,
850
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 14
}
}
},
"property": {
"type": "Identifier",
"name": "call",
"range": [
851,
855
],
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 19
}
}
},
"range": [
844,
855
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 19
}
}
},
"arguments": [
{
"type": "ThisExpression",
"range": [
856,
860
],
"loc": {
"start": {
"line": 20,
"column": 20
},
"end": {
"line": 20,
"column": 24
}
}
},
{
"type": "Literal",
"value": null,
"raw": "null",
"range": [
862,
866
],
"loc": {
"start": {
"line": 20,
"column": 26
},
"end": {
"line": 20,
"column": 30
}
}
}
],
"range": [
844,
867
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 31
}
}
},
"range": [
844,
868
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 32
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
877,
881
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "ish",
"range": [
882,
885
],
"loc": {
"start": {
"line": 21,
"column": 13
},
"end": {
"line": 21,
"column": 16
}
}
},
"range": [
877,
885
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 16
}
}
},
"right": {
"type": "Identifier",
"name": "ish",
"range": [
888,
891
],
"loc": {
"start": {
"line": 21,
"column": 19
},
"end": {
"line": 21,
"column": 22
}
}
},
"range": [
877,
891
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 22
}
}
},
"range": [
877,
892
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 23
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
901,
905
],
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "scheduler",
"range": [
906,
915
],
"loc": {
"start": {
"line": 22,
"column": 13
},
"end": {
"line": 22,
"column": 22
}
}
},
"range": [
901,
915
],
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 22
}
}
},
"right": {
"type": "Identifier",
"name": "scheduler",
"range": [
918,
927
],
"loc": {
"start": {
"line": 22,
"column": 25
},
"end": {
"line": 22,
"column": 34
}
}
},
"range": [
901,
927
],
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 34
}
}
},
"range": [
901,
928
],
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 35
}
}
}
],
"range": [
834,
934
],
"loc": {
"start": {
"line": 19,
"column": 44
},
"end": {
"line": 23,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
794,
934
],
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 23,
"column": 5
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * Creates an Observable from an Array, an array-like object, a Promise, an\n * iterable object, or an Observable-like object.\n *\n * <span class=\"informal\">Converts almost anything to an Observable.</span>\n *\n * <img src=\"./img/from.png\" width=\"100%\">\n *\n * Convert various other objects and data types into Observables. `from`\n * converts a Promise or an array-like or an\n * [i