@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,459 lines (1,458 loc) • 390 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,
40
],
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 40
}
}
},
"range": [
0,
41
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 41
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "isObject",
"range": [
51,
59
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 17
}
}
},
"imported": {
"type": "Identifier",
"name": "isObject",
"range": [
51,
59
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 17
}
}
},
"range": [
51,
59
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 17
}
}
}
],
"source": {
"type": "Literal",
"value": "./util/isObject",
"raw": "'./util/isObject'",
"range": [
67,
84
],
"loc": {
"start": {
"line": 2,
"column": 25
},
"end": {
"line": 2,
"column": 42
}
}
},
"range": [
42,
85
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 43
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "isFunction",
"range": [
95,
105
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 19
}
}
},
"imported": {
"type": "Identifier",
"name": "isFunction",
"range": [
95,
105
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 19
}
}
},
"range": [
95,
105
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 19
}
}
}
],
"source": {
"type": "Literal",
"value": "./util/isFunction",
"raw": "'./util/isFunction'",
"range": [
113,
132
],
"loc": {
"start": {
"line": 3,
"column": 27
},
"end": {
"line": 3,
"column": 46
}
}
},
"range": [
86,
133
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 47
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "tryCatch",
"range": [
143,
151
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 17
}
}
},
"imported": {
"type": "Identifier",
"name": "tryCatch",
"range": [
143,
151
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 17
}
}
},
"range": [
143,
151
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 17
}
}
}
],
"source": {
"type": "Literal",
"value": "./util/tryCatch",
"raw": "'./util/tryCatch'",
"range": [
159,
176
],
"loc": {
"start": {
"line": 4,
"column": 25
},
"end": {
"line": 4,
"column": 42
}
}
},
"range": [
134,
177
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 43
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "errorObject",
"range": [
187,
198
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 20
}
}
},
"imported": {
"type": "Identifier",
"name": "errorObject",
"range": [
187,
198
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 20
}
}
},
"range": [
187,
198
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 20
}
}
}
],
"source": {
"type": "Literal",
"value": "./util/errorObject",
"raw": "'./util/errorObject'",
"range": [
206,
226
],
"loc": {
"start": {
"line": 5,
"column": 28
},
"end": {
"line": 5,
"column": 48
}
}
},
"range": [
178,
227
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 49
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "UnsubscriptionError",
"range": [
237,
256
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 28
}
}
},
"imported": {
"type": "Identifier",
"name": "UnsubscriptionError",
"range": [
237,
256
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 28
}
}
},
"range": [
237,
256
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 28
}
}
}
],
"source": {
"type": "Literal",
"value": "./util/UnsubscriptionError",
"raw": "'./util/UnsubscriptionError'",
"range": [
264,
292
],
"loc": {
"start": {
"line": 6,
"column": 36
},
"end": {
"line": 6,
"column": 64
}
}
},
"range": [
228,
293
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 65
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * Represents a disposable resource, such as the execution of an Observable. A\n * Subscription has one important method, `unsubscribe`, that takes no argument\n * and just disposes the resource held by the subscription.\n *\n * Additionally, subscriptions may be grouped together through the `add()`\n * method, which will attach a child Subscription to the current Subscription.\n * When a Subscription is unsubscribed, all its children (and its grandchildren)\n * will be unsubscribed as well.\n *\n * @class Subscription\n ",
"range": [
294,
817
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 18,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Subscription",
"range": [
829,
841
],
"loc": {
"start": {
"line": 19,
"column": 11
},
"end": {
"line": 19,
"column": 23
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "Subscription",
"range": [
1046,
1058
],
"loc": {
"start": {
"line": 24,
"column": 13
},
"end": {
"line": 24,
"column": 25
}
}
},
"params": [
{
"type": "Identifier",
"name": "unsubscribe",
"range": [
1059,
1070
],
"loc": {
"start": {
"line": 24,
"column": 26
},
"end": {
"line": 24,
"column": 37
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
1220,
1224
],
"loc": {
"start": {
"line": 29,
"column": 8
},
"end": {
"line": 29,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "closed",
"range": [
1225,
1231
],
"loc": {
"start": {
"line": 29,
"column": 13
},
"end": {
"line": 29,
"column": 19
}
}
},
"range": [
1220,
1231
],
"loc": {
"start": {
"line": 29,
"column": 8
},
"end": {
"line": 29,
"column": 19
}
}
},
"right": {
"type": "Literal",
"value": false,
"raw": "false",
"range": [
1234,
1239
],
"loc": {
"start": {
"line": 29,
"column": 22
},
"end": {
"line": 29,
"column": 27
}
}
},
"range": [
1220,
1239
],
"loc": {
"start": {
"line": 29,
"column": 8
},
"end": {
"line": 29,
"column": 27
}
}
},
"range": [
1220,
1240
],
"loc": {
"start": {
"line": 29,
"column": 8
},
"end": {
"line": 29,
"column": 28
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * A flag to indicate whether this Subscription has already been unsubscribed.\n * @type {boolean}\n ",
"range": [
1082,
1211
],
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 28,
"column": 11
}
}
}
]
},
{
"type": "IfStatement",
"test": {
"type": "Identifier",
"name": "unsubscribe",
"range": [
1253,
1264
],
"loc": {
"start": {
"line": 30,
"column": 12
},
"end": {
"line": 30,
"column": 23
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
1280,
1284
],
"loc": {
"start": {
"line": 31,
"column": 12
},
"end": {
"line": 31,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"name": "_unsubscribe",
"range": [
1285,
1297
],
"loc": {
"start": {
"line": 31,
"column": 17
},
"end": {
"line": 31,
"column": 29
}
}
},
"range": [
1280,
1297
],
"loc": {
"start": {
"line": 31,
"column": 12
},
"end": {
"line": 31,
"column": 29
}
}
},
"right": {
"type": "Identifier",
"name": "unsubscribe",
"range": [
1300,
1311
],
"loc": {
"start": {
"line": 31,
"column": 32
},
"end": {
"line": 31,
"column": 43
}
}
},
"range": [
1280,
1311
],
"loc": {
"start": {
"line": 31,
"column": 12
},
"end": {
"line": 31,
"column": 43
}
}
},
"range": [
1280,
1312
],
"loc": {
"start": {
"line": 31,
"column": 12
},
"end": {
"line": 31,
"column": 44
}
}
}
],
"range": [
1266,
1322
],
"loc": {
"start": {
"line": 30,
"column": 25
},
"end": {
"line": 32,
"column": 9
}
}
},
"alternate": null,
"range": [
1249,
1322
],
"loc": {
"start": {
"line": 30,
"column": 8
},
"end": {
"line": 32,
"column": 9
}
}
}
],
"range": [
1072,
1328
],
"loc": {
"start": {
"line": 24,
"column": 39
},
"end": {
"line": 33,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
1037,
1328
],
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 33,
"column": 5
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * @param {function(): void} [unsubscribe] A function describing how to\n * perform the disposal of resources when the `unsubscribe` method is called.\n ",
"range": [
863,
1032
],
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 23,
"column": 7
}
}
}
],
"trailingComments": [
{
"type": "Block",
"value": "*\n * Disposes the resources held by the subscription. May, for instance, cancel\n * an ongoing Observable execution or cancel any other type of work that\n * started when the Subscription was created.\n * @return {void}\n ",
"range": [
1333,
1575
],
"loc": {
"start": {
"line": 34,
"column": 4
},
"end": {
"line": 39,
"column": 7
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Subscription",
"range": [
1580,
1592
],
"loc": {
"start": {
"line": 40,
"column": 4
},
"end": {
"line": 40,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"name": "prototype",
"range": [
1593,
1602
],
"loc": {
"start": {
"line": 40,
"column": 17
},
"end": {
"line": 40,
"column": 26
}
}
},
"range": [
1580,
1602
],
"loc": {
"start": {
"line": 40,
"column": 4
},
"end": {
"line": 40,
"column": 26
}
}
},
"property": {
"type": "Identifier",
"name": "unsubscribe",
"range": [
1603,
1614
],
"loc": {
"start": {
"line": 40,
"column": 27
},
"end": {
"line": 40,
"column": 38
}
}
},
"range": [
1580,
1614
],
"loc": {
"start": {
"line": 40,
"column": 4
},
"end": {
"line": 40,
"column": 38
}
}
},
"right": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "hasErrors",
"range": [
1643,
1652
],
"loc": {
"start": {
"line": 41,
"column": 12
},
"end": {
"line": 41,
"column": 21
}
}
},
"init": {
"type": "Literal",
"value": false,
"raw": "false",
"range": [
1655,
1660
],
"loc": {
"start": {
"line": 41,
"column": 24
},
"end": {
"line": 41,
"column": 29
}
}
},
"range": [
1643,
1660
],
"loc": {
"start": {
"line": 41,
"column": 12
},
"end": {
"line": 41,
"column": 29
}
}
}
],
"kind": "var",
"range": [
1639,
1661
],
"loc": {
"start": {
"line": 41,
"column": 8
},
"end": {
"line": 41,
"column": 30
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "errors",
"range": [
1674,
1680
],
"loc": {
"start": {
"line": 42,
"column": 12
},
"end": {
"line": 42,
"column": 18
}
}
},
"init": null,
"range": [
1674,
1680
],
"loc": {
"start": {
"line": 42,
"column": 12
},
"end": {
"line": 42,
"column": 18
}
}
}
],
"kind": "var",
"range": [
1670,
1681
],
"loc": {
"start": {
"line": 42,
"column": 8
},
"end": {
"line": 42,
"column": 19
}
}
},
{
"type": "IfStatement",
"test": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
1694,
1698
],
"loc": {
"start": {
"line": 43,
"column": 12
},
"end": {
"line": 43,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"name": "closed",
"range": [
1699,
1705
],
"loc": {
"start": {
"line": 43,
"column": 17
},
"end": {
"line": 43,
"column": 23
}
}
},
"range": [
1694,
1705
],
"loc": {
"start": {
"line": 43,
"column": 12
},
"end": {
"line": 43,
"column": 23
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": null,
"range": [
1721,
1728
],
"loc": {
"start": {
"line": 44,
"column": 12
},
"end": {
"line": 44,
"column": 19
}
}
}
],
"range": [
1707,
1738
],
"loc": {
"start": {
"line": 43,
"column": 25
},
"end": {
"line": 45,
"column": 9
}
}
},
"alternate": null,
"range": [
1690,
1738
],
"loc": {
"start": {
"line": 43,
"column": 8
},
"end": {
"line": 45,
"column": 9
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
1747,
1751
],
"loc": {
"start": {
"line": 46,
"column": 8
},
"end": {
"line": 46,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "closed",
"range": [
1752,
1758
],
"loc": {
"start": {
"line": 46,
"column": 13
},
"end": {
"line": 46,
"column": 19
}
}
},
"range": [
1747,
1758
],
"loc": {
"start": {
"line": 46,
"column": 8
},
"end": {
"line": 46,
"column": 19
}
}
},
"right": {
"type": "Literal",
"value": true,
"raw": "true",
"range": [
1761,
1765
],
"loc": {
"start": {
"line": 46,
"column": 22
},
"end": {
"line": 46,
"column": 26
}
}
},
"range": [
1747,
1765
],
"loc": {
"start": {
"line": 46,
"column": 8
},
"end": {
"line": 46,
"column": 26
}
}
},
"range": [
1747,
1766
],
"loc": {
"start": {
"line": 46,
"column": 8
},
"end": {
"line": 46,
"column": 27
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{