@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,330 lines (1,329 loc) • 296 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "root",
"range": [
9,
13
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 13
}
}
},
"imported": {
"type": "Identifier",
"name": "root",
"range": [
9,
13
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 13
}
}
},
"range": [
9,
13
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 13
}
}
}
],
"source": {
"type": "Literal",
"value": "./util/root",
"raw": "'./util/root'",
"range": [
21,
34
],
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 34
}
}
},
"range": [
0,
35
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 35
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "toSubscriber",
"range": [
45,
57
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 21
}
}
},
"imported": {
"type": "Identifier",
"name": "toSubscriber",
"range": [
45,
57
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 21
}
}
},
"range": [
45,
57
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 21
}
}
}
],
"source": {
"type": "Literal",
"value": "./util/toSubscriber",
"raw": "'./util/toSubscriber'",
"range": [
65,
86
],
"loc": {
"start": {
"line": 2,
"column": 29
},
"end": {
"line": 2,
"column": 50
}
}
},
"range": [
36,
87
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 51
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "$$observable",
"range": [
97,
109
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 21
}
}
},
"imported": {
"type": "Identifier",
"name": "$$observable",
"range": [
97,
109
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 21
}
}
},
"range": [
97,
109
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 21
}
}
}
],
"source": {
"type": "Literal",
"value": "./symbol/observable",
"raw": "'./symbol/observable'",
"range": [
117,
138
],
"loc": {
"start": {
"line": 3,
"column": 29
},
"end": {
"line": 3,
"column": 50
}
}
},
"range": [
88,
139
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 51
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * A representation of any set of values over any amount of time. This the most basic building block\n * of RxJS.\n *\n * @class Observable<T>\n ",
"range": [
140,
287
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 9,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Observable",
"range": [
299,
309
],
"loc": {
"start": {
"line": 10,
"column": 11
},
"end": {
"line": 10,
"column": 21
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "Observable",
"range": [
703,
713
],
"loc": {
"start": {
"line": 18,
"column": 13
},
"end": {
"line": 18,
"column": 23
}
}
},
"params": [
{
"type": "Identifier",
"name": "subscribe",
"range": [
714,
723
],
"loc": {
"start": {
"line": 18,
"column": 24
},
"end": {
"line": 18,
"column": 33
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
735,
739
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "_isScalar",
"range": [
740,
749
],
"loc": {
"start": {
"line": 19,
"column": 13
},
"end": {
"line": 19,
"column": 22
}
}
},
"range": [
735,
749
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 22
}
}
},
"right": {
"type": "Literal",
"value": false,
"raw": "false",
"range": [
752,
757
],
"loc": {
"start": {
"line": 19,
"column": 25
},
"end": {
"line": 19,
"column": 30
}
}
},
"range": [
735,
757
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 30
}
}
},
"range": [
735,
758
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 31
}
}
},
{
"type": "IfStatement",
"test": {
"type": "Identifier",
"name": "subscribe",
"range": [
771,
780
],
"loc": {
"start": {
"line": 20,
"column": 12
},
"end": {
"line": 20,
"column": 21
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
796,
800
],
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"name": "_subscribe",
"range": [
801,
811
],
"loc": {
"start": {
"line": 21,
"column": 17
},
"end": {
"line": 21,
"column": 27
}
}
},
"range": [
796,
811
],
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 27
}
}
},
"right": {
"type": "Identifier",
"name": "subscribe",
"range": [
814,
823
],
"loc": {
"start": {
"line": 21,
"column": 30
},
"end": {
"line": 21,
"column": 39
}
}
},
"range": [
796,
823
],
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 39
}
}
},
"range": [
796,
824
],
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 40
}
}
}
],
"range": [
782,
834
],
"loc": {
"start": {
"line": 20,
"column": 23
},
"end": {
"line": 22,
"column": 9
}
}
},
"alternate": null,
"range": [
767,
834
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 22,
"column": 9
}
}
}
],
"range": [
725,
840
],
"loc": {
"start": {
"line": 18,
"column": 35
},
"end": {
"line": 23,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
694,
840
],
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 23,
"column": 5
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * @constructor\n * @param {Function} subscribe the function that is called when the Observable is\n * initially subscribed to. This function is given a Subscriber, to which new values\n * can be `next`ed, or an `error` method can be called to raise an error, or\n * `complete` can be called to notify of a successful completion.\n ",
"range": [
331,
689
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 17,
"column": 7
}
}
}
],
"trailingComments": [
{
"type": "Block",
"value": "*\n * Creates a new Observable, with this Observable as the source, and the passed\n * operator defined as the new observable's operator.\n * @method lift\n * @param {Operator} operator the operator defining the operation to take on the observable\n * @return {Observable} a new observable with the Operator applied\n ",
"range": [
845,
1185
],
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 30,
"column": 7
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Observable",
"range": [
1190,
1200
],
"loc": {
"start": {
"line": 31,
"column": 4
},
"end": {
"line": 31,
"column": 14
}
}
},
"property": {
"type": "Identifier",
"name": "prototype",
"range": [
1201,
1210
],
"loc": {
"start": {
"line": 31,
"column": 15
},
"end": {
"line": 31,
"column": 24
}
}
},
"range": [
1190,
1210
],
"loc": {
"start": {
"line": 31,
"column": 4
},
"end": {
"line": 31,
"column": 24
}
}
},
"property": {
"type": "Identifier",
"name": "lift",
"range": [
1211,
1215
],
"loc": {
"start": {
"line": 31,
"column": 25
},
"end": {
"line": 31,
"column": 29
}
}
},
"range": [
1190,
1215
],
"loc": {
"start": {
"line": 31,
"column": 4
},
"end": {
"line": 31,
"column": 29
}
}
},
"right": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "operator",
"range": [
1228,
1236
],
"loc": {
"start": {
"line": 31,
"column": 42
},
"end": {
"line": 31,
"column": 50
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "observable",
"range": [
1252,
1262
],
"loc": {
"start": {
"line": 32,
"column": 12
},
"end": {
"line": 32,
"column": 22
}
}
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Observable",
"range": [
1269,
1279
],
"loc": {
"start": {
"line": 32,
"column": 29
},
"end": {
"line": 32,
"column": 39
}
}
},
"arguments": [],
"range": [
1265,
1281
],
"loc": {
"start": {
"line": 32,
"column": 25
},
"end": {
"line": 32,
"column": 41
}
}
},
"range": [
1252,
1281
],
"loc": {
"start": {
"line": 32,
"column": 12
},
"end": {
"line": 32,
"column": 41
}
}
}
],
"kind": "var",
"range": [
1248,
1282
],
"loc": {
"start": {
"line": 32,
"column": 8
},
"end": {
"line": 32,
"column": 42
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "observable",
"range": [
1291,
1301
],
"loc": {
"start": {
"line": 33,
"column": 8
},
"end": {
"line": 33,
"column": 18
}
}
},
"property": {
"type": "Identifier",
"name": "source",
"range": [
1302,
1308
],
"loc": {
"start": {
"line": 33,
"column": 19
},
"end": {
"line": 33,
"column": 25
}
}
},
"range": [
1291,
1308
],
"loc": {
"start": {
"line": 33,
"column": 8
},
"end": {
"line": 33,
"column": 25
}
}
},
"right": {
"type": "ThisExpression",
"range": [
1311,
1315
],
"loc": {
"start": {
"line": 33,
"column": 28
},
"end": {
"line": 33,
"column": 32
}
}
},
"range": [
1291,
1315
],
"loc": {
"start": {
"line": 33,
"column": 8
},
"end": {
"line": 33,
"column": 32
}
}
},
"range": [
1291,
1316
],
"loc": {
"start": {
"line": 33,
"column": 8
},
"end": {
"line": 33,
"column": 33
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "observable",
"range": [
1325,
1335
],
"loc": {
"start": {
"line": 34,
"column": 8
},
"end": {
"line": 34,
"column": 18
}
}
},
"property": {
"type": "Identifier",
"name": "operator",
"range": [
1336,
1344
],
"loc": {
"start": {
"line": 34,
"column": 19
},
"end": {
"line": 34,
"column": 27
}
}
},
"range": [
1325,
1344
],
"loc": {
"start": {
"line": 34,
"column": 8
},
"end": {
"line": 34,
"column": 27
}
}
},
"right": {
"type": "Identifier",
"name": "operator",
"range": [
1347,
1355
],
"loc": {
"start": {
"line": 34,
"column": 30
},
"end": {
"line": 34,
"column": 38
}
}
},
"range": [
1325,
1355
],
"loc": {
"start": {
"line": 34,
"column": 8
},
"end": {
"line": 34,
"column": 38
}
}
},
"range": [
1325,
1356
],
"loc": {
"start": {
"line": 34,
"column": 8
},
"end": {
"line": 34,
"column": 39
}
}
},
{
"type": "ReturnStatement",
"argument": {
"type": "Identifier",
"name": "observable",
"range": [
1372,
1382
],
"loc": {
"start": {
"line": 35,
"column": 15
},
"end": {
"line": 35,
"column": 25
}
}
},
"range": [
1365,
1383
],
"loc": {
"start": {
"line": 35,
"column": 8
},
"end": {
"line": 35,
"column": 26
}
}
}
],
"range": [
1238,
1389
],
"loc": {
"start": {
"line": 31,
"column": 52
},
"end": {
"line": 36,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
1218,
1389
],
"loc": {
"start": {
"line": 31,
"column": 32
},
"end": {
"line": 36,
"column": 5
}
}
},
"range": [
1190,
1389
],
"loc": {
"start": {
"line": 31,
"column": 4
},
"end": {
"line": 36,
"column": 5
}
}
},
"range": [
1190,
1390
],
"loc": {
"start": {
"line": 31,
"column": 4
},
"end": {
"line": 36,
"column": 6
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * Creates a new Observable, with this Observable as the source, and the passed\n * operator defined as the new observable's operator.\n * @method lift\n * @param {Operator} operator the operator defining the operation to take on the observable\n * @return {Observable} a new observable with the Operator applied\n ",
"range": [
845,
1185
],
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 30,
"column": 7
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Observable",
"range": [
1395,
1405
],
"loc": {
"start": {
"line": 37,
"column": 4
},
"end": {
"line": 37,
"column": 14
}
}
},
"property": {
"type": "Identifier",
"name": "prototype",
"range": [
1406,
1415
],
"loc": {
"start": {
"line": 37,
"column": 15
},
"end": {
"line": 37,
"column": 24
}
}
},
"range": [
1395,
1415
],
"loc": {
"start": {
"line": 37,
"column": 4
},
"end": {
"line": 37,
"column": 24
}
}
},
"property": {
"type": "Identifier",
"name": "subscribe",
"range": [
1416,
1425
],
"loc": {
"start": {
"line": 37,