@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,410 lines • 64.5 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Subscriber",
"range": [
9,
19
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 19
}
}
},
"imported": {
"type": "Identifier",
"name": "Subscriber",
"range": [
9,
19
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 19
}
}
},
"range": [
9,
19
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 19
}
}
}
],
"source": {
"type": "Literal",
"value": "../Subscriber",
"raw": "'../Subscriber'",
"range": [
27,
42
],
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 42
}
}
},
"range": [
0,
43
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 43
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * Converts an Observable of {@link Notification} objects into the emissions\n * that they represent.\n *\n * <span class=\"informal\">Unwraps {@link Notification} objects as actual `next`,\n * `error` and `complete` emissions. The opposite of {@link materialize}.</span>\n *\n * <img src=\"./img/dematerialize.png\" width=\"100%\">\n *\n * `dematerialize` is assumed to operate an Observable that only emits\n * {@link Notification} objects as `next` emissions, and does not emit any\n * `error`. Such Observable is the output of a `materialize` operation. Those\n * notifications are then unwrapped using the metadata they contain, and emitted\n * as `next`, `error`, and `complete` on the output Observable.\n *\n * Use this operator in conjunction with {@link materialize}.\n *\n * @example <caption>Convert an Observable of Notifications to an actual Observable</caption>\n * var notifA = new Rx.Notification('N', 'A');\n * var notifB = new Rx.Notification('N', 'B');\n * var notifE = new Rx.Notification('E', void 0,\n * new TypeError('x.toUpperCase is not a function')\n * );\n * var materialized = Rx.Observable.of(notifA, notifB, notifE);\n * var upperCase = materialized.dematerialize();\n * upperCase.subscribe(x => console.log(x), e => console.error(e));\n *\n * @see {@link Notification}\n * @see {@link materialize}\n *\n * @return {Observable} An Observable that emits items and notifications\n * embedded in Notification objects emitted by the source Observable.\n * @method dematerialize\n * @owner Observable\n ",
"range": [
44,
1542
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 36,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "dematerialize",
"range": [
1559,
1572
],
"loc": {
"start": {
"line": 37,
"column": 16
},
"end": {
"line": 37,
"column": 29
}
}
},
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
1588,
1592
],
"loc": {
"start": {
"line": 38,
"column": 11
},
"end": {
"line": 38,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"name": "lift",
"range": [
1593,
1597
],
"loc": {
"start": {
"line": 38,
"column": 16
},
"end": {
"line": 38,
"column": 20
}
}
},
"range": [
1588,
1597
],
"loc": {
"start": {
"line": 38,
"column": 11
},
"end": {
"line": 38,
"column": 20
}
}
},
"arguments": [
{
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "DeMaterializeOperator",
"range": [
1602,
1623
],
"loc": {
"start": {
"line": 38,
"column": 25
},
"end": {
"line": 38,
"column": 46
}
}
},
"arguments": [],
"range": [
1598,
1625
],
"loc": {
"start": {
"line": 38,
"column": 21
},
"end": {
"line": 38,
"column": 48
}
}
}
],
"range": [
1588,
1626
],
"loc": {
"start": {
"line": 38,
"column": 11
},
"end": {
"line": 38,
"column": 49
}
}
},
"range": [
1581,
1627
],
"loc": {
"start": {
"line": 38,
"column": 4
},
"end": {
"line": 38,
"column": 50
}
}
}
],
"range": [
1575,
1629
],
"loc": {
"start": {
"line": 37,
"column": 32
},
"end": {
"line": 39,
"column": 1
}
}
},
"generator": false,
"expression": false,
"range": [
1550,
1629
],
"loc": {
"start": {
"line": 37,
"column": 7
},
"end": {
"line": 39,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * Converts an Observable of {@link Notification} objects into the emissions\n * that they represent.\n *\n * <span class=\"informal\">Unwraps {@link Notification} objects as actual `next`,\n * `error` and `complete` emissions. The opposite of {@link materialize}.</span>\n *\n * <img src=\"./img/dematerialize.png\" width=\"100%\">\n *\n * `dematerialize` is assumed to operate an Observable that only emits\n * {@link Notification} objects as `next` emissions, and does not emit any\n * `error`. Such Observable is the output of a `materialize` operation. Those\n * notifications are then unwrapped using the metadata they contain, and emitted\n * as `next`, `error`, and `complete` on the output Observable.\n *\n * Use this operator in conjunction with {@link materialize}.\n *\n * @example <caption>Convert an Observable of Notifications to an actual Observable</caption>\n * var notifA = new Rx.Notification('N', 'A');\n * var notifB = new Rx.Notification('N', 'B');\n * var notifE = new Rx.Notification('E', void 0,\n * new TypeError('x.toUpperCase is not a function')\n * );\n * var materialized = Rx.Observable.of(notifA, notifB, notifE);\n * var upperCase = materialized.dematerialize();\n * upperCase.subscribe(x => console.log(x), e => console.error(e));\n *\n * @see {@link Notification}\n * @see {@link materialize}\n *\n * @return {Observable} An Observable that emits items and notifications\n * embedded in Notification objects emitted by the source Observable.\n * @method dematerialize\n * @owner Observable\n ",
"range": [
44,
1542
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 36,
"column": 3
}
}
}
],
"trailingComments": []
},
"specifiers": [],
"source": null,
"range": [
1543,
1629
],
"loc": {
"start": {
"line": 37,
"column": 0
},
"end": {
"line": 39,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * Converts an Observable of {@link Notification} objects into the emissions\n * that they represent.\n *\n * <span class=\"informal\">Unwraps {@link Notification} objects as actual `next`,\n * `error` and `complete` emissions. The opposite of {@link materialize}.</span>\n *\n * <img src=\"./img/dematerialize.png\" width=\"100%\">\n *\n * `dematerialize` is assumed to operate an Observable that only emits\n * {@link Notification} objects as `next` emissions, and does not emit any\n * `error`. Such Observable is the output of a `materialize` operation. Those\n * notifications are then unwrapped using the metadata they contain, and emitted\n * as `next`, `error`, and `complete` on the output Observable.\n *\n * Use this operator in conjunction with {@link materialize}.\n *\n * @example <caption>Convert an Observable of Notifications to an actual Observable</caption>\n * var notifA = new Rx.Notification('N', 'A');\n * var notifB = new Rx.Notification('N', 'B');\n * var notifE = new Rx.Notification('E', void 0,\n * new TypeError('x.toUpperCase is not a function')\n * );\n * var materialized = Rx.Observable.of(notifA, notifB, notifE);\n * var upperCase = materialized.dematerialize();\n * upperCase.subscribe(x => console.log(x), e => console.error(e));\n *\n * @see {@link Notification}\n * @see {@link materialize}\n *\n * @return {Observable} An Observable that emits items and notifications\n * embedded in Notification objects emitted by the source Observable.\n * @method dematerialize\n * @owner Observable\n ",
"range": [
44,
1542
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 36,
"column": 3
}
}
}
]
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "DeMaterializeOperator",
"range": [
1634,
1655
],
"loc": {
"start": {
"line": 40,
"column": 4
},
"end": {
"line": 40,
"column": 25
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "DeMaterializeOperator",
"range": [
1686,
1707
],
"loc": {
"start": {
"line": 41,
"column": 13
},
"end": {
"line": 41,
"column": 34
}
}
},
"params": [],
"body": {
"type": "BlockStatement",
"body": [],
"range": [
1710,
1717
],
"loc": {
"start": {
"line": 41,
"column": 37
},
"end": {
"line": 42,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
1677,
1717
],
"loc": {
"start": {
"line": 41,
"column": 4
},
"end": {
"line": 42,
"column": 5
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "DeMaterializeOperator",
"range": [
1722,
1743
],
"loc": {
"start": {
"line": 43,
"column": 4
},
"end": {
"line": 43,
"column": 25
}
}
},
"property": {
"type": "Identifier",
"name": "prototype",
"range": [
1744,
1753
],
"loc": {
"start": {
"line": 43,
"column": 26
},
"end": {
"line": 43,
"column": 35
}
}
},
"range": [
1722,
1753
],
"loc": {
"start": {
"line": 43,
"column": 4
},
"end": {
"line": 43,
"column": 35
}
}
},
"property": {
"type": "Identifier",
"name": "call",
"range": [
1754,
1758
],
"loc": {
"start": {
"line": 43,
"column": 36
},
"end": {
"line": 43,
"column": 40
}
}
},
"range": [
1722,
1758
],
"loc": {
"start": {
"line": 43,
"column": 4
},
"end": {
"line": 43,
"column": 40
}
}
},
"right": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "subscriber",
"range": [
1771,
1781
],
"loc": {
"start": {
"line": 43,
"column": 53
},
"end": {
"line": 43,
"column": 63
}
}
},
{
"type": "Identifier",
"name": "source",
"range": [
1783,
1789
],
"loc": {
"start": {
"line": 43,
"column": 65
},
"end": {
"line": 43,
"column": 71
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "source",
"range": [
1808,
1814
],
"loc": {
"start": {
"line": 44,
"column": 15
},
"end": {
"line": 44,
"column": 21
}
}
},
"property": {
"type": "Identifier",
"name": "_subscribe",
"range": [
1815,
1825
],
"loc": {
"start": {
"line": 44,
"column": 22
},
"end": {
"line": 44,
"column": 32
}
}
},
"range": [
1808,
1825
],
"loc": {
"start": {
"line": 44,
"column": 15
},
"end": {
"line": 44,
"column": 32
}
}
},
"arguments": [
{
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "DeMaterializeSubscriber",
"range": [
1830,
1853
],
"loc": {
"start": {
"line": 44,
"column": 37
},
"end": {
"line": 44,
"column": 60
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "subscriber",
"range": [
1854,
1864
],
"loc": {
"start": {
"line": 44,
"column": 61
},
"end": {
"line": 44,
"column": 71
}
}
}
],
"range": [
1826,
1865
],
"loc": {
"start": {
"line": 44,
"column": 33
},
"end": {
"line": 44,
"column": 72
}
}
}
],
"range": [
1808,
1866
],
"loc": {
"start": {
"line": 44,
"column": 15
},
"end": {
"line": 44,
"column": 73
}
}
},
"range": [
1801,
1867
],
"loc": {
"start": {
"line": 44,
"column": 8
},
"end": {
"line": 44,
"column": 74
}
}
}
],
"range": [
1791,
1873
],
"loc": {
"start": {
"line": 43,
"column": 73
},
"end": {
"line": 45,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
1761,
1873
],
"loc": {
"start": {
"line": 43,
"column": 43
},
"end": {
"line": 45,
"column": 5
}
}
},
"range": [
1722,
1873
],
"loc": {
"start": {
"line": 43,
"column": 4
},
"end": {
"line": 45,
"column": 5
}
}
},
"range": [
1722,
1874
],
"loc": {
"start": {
"line": 43,
"column": 4
},
"end": {
"line": 45,
"column": 6
}
}
},
{
"type": "ReturnStatement",
"argument": {
"type": "Identifier",
"name": "DeMaterializeOperator",
"range": [
1886,
1907
],
"loc": {
"start": {
"line": 46,
"column": 11
},
"end": {
"line": 46,
"column": 32
}
}
},
"range": [
1879,
1908
],
"loc": {
"start": {
"line": 46,
"column": 4
},
"end": {
"line": 46,
"column": 33
}
}
}
],
"range": [
1671,
1910
],
"loc": {
"start": {
"line": 40,
"column": 41
},
"end": {
"line": 47,
"column": 1
}
}
},
"generator": false,
"expression": false,
"range": [
1659,
1910
],
"loc": {
"start": {
"line": 40,
"column": 29
},
"end": {
"line": 47,
"column": 1
}
}
},
"arguments": [],
"range": [
1659,
1912
],
"loc": {
"start": {
"line": 40,
"column": 29
},
"end": {
"line": 47,
"column": 3
}
}
},
"range": [
1634,
1913
],
"loc": {
"start": {
"line": 40,
"column": 4
},
"end": {
"line": 47,
"column": 4
}
}
}
],
"kind": "var",
"range": [
1630,
1914
],
"loc": {
"start": {
"line": 40,
"column": 0
},
"end": {
"line": 47,
"column": 5
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n ",
"range": [
1915,
2006
],
"loc": {
"start": {
"line": 48,
"column": 0
},
"end": {
"line": 52,
"column": 3
}
}
}
]
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "DeMaterializeSubscriber",
"range": [
2011,
2034
],
"loc": {
"start": {
"line": 53,
"column": 4
},
"end": {
"line": 53,
"column": 27
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "_super",
"range": [
2048,
2054
],
"loc": {
"start": {
"line": 53,
"column": 41
},
"end": {
"line": 53,
"column": 47
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "__extends",
"range": [
2062,
2071
],
"loc": {
"start": {
"line": 54,
"column": 4
},
"end": {
"line": 54,
"column": 13
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "DeMaterializeSubscriber",
"range": [
2072,
2095
],
"loc": {
"start": {
"line": 54,
"column": 14
},
"end": {
"line": 54,
"column": 37
}
}
},
{
"type": "Identifier",
"name": "_super",
"range": [
2097,
2103
],
"loc": {
"start": {
"line": 54,
"column": 39
},
"end": {
"line": 54,
"column": 45
}
}
}
],
"range": [
2062,
2104
],
"loc": {
"start": {
"line": 54,
"column": 4
},
"end": {
"line": 54,
"column": 46
}
}
},
"range": [
2062,
2105
],
"loc": {
"start": {
"line": 54,
"column": 4
},
"end": {
"line": 54,
"column": 47
}
}
},
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "DeMaterializeSubscriber",
"range": [
2119,
2142
],
"loc": {
"start": {
"line": 55,
"column": 13
},
"end": {
"line": 55,
"column": 36
}
}
},
"params": [
{
"type": "Identifier",
"name": "destination",
"range": [
2143,
2154
],
"loc": {
"start": {
"line": 55,
"column": 37
},
"end": {
"line": 55,
"column": 48
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "_super",
"range": [
2166,
2172
],
"loc": {
"start": {
"line": 56,
"column": 8
},
"end": {
"line": 56,
"column": 14
}
}
},
"property": {
"type": "Identifier",
"name": "call",
"range": [
2173,
2177
],
"loc": {
"start": {
"line": 56,
"column": 15
},
"end": {
"line": 56,
"column": 19
}
}
},
"range": [
2166,
2177
],
"loc": {
"start": {
"line": 56,
"column": 8
},
"end": {
"line": 56,
"column": 19
}
}
},
"arguments": [
{
"type": "ThisExpression",
"range": [
2178,
2182
],
"loc": {
"start": {
"line": 56,
"column": 20
},
"end": {
"line": 56,
"column": 24
}
}
},
{
"type": "Identifier",
"name": "destination",
"range": [
2184,
2195
],
"loc": {
"start": {
"line": 56,
"column": 26
},
"end": {
"line": 56,
"column": 37
}
}
}
],
"range": [
2166,
2196
],
"loc": {
"start": {
"line": 56,
"column": 8
},
"end": {
"line": 56,
"column": 38
}
}
},
"range": [
2166,
2197
],
"loc": {
"start": {
"line": 56,
"column": 8
},
"end": {
"line": 56,
"column": 39
}
}
}
],
"range": [
2156,
2203
],
"loc": {
"start": {
"line": 55,
"column": 50
},
"end": {
"line": 57,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
2110,
2203
],
"loc": {
"start": {
"line": 55,
"column": 4
},
"end": {
"line": 57,
"column": 5
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "DeMaterializeSubscriber",
"range": [
2208,
2231
],
"loc": {
"start": {
"line": 58,
"column": 4
},
"end": {
"line": 58,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "prototype",
"range": [
2232,
2241
],
"loc": {
"start": {
"line": 58,
"column": 28
},
"end": {
"line": 58,
"column": 37
}
}
},
"range": [
2208,
2241
],
"loc": {
"start": {
"line": 58,
"column": 4
},
"end": {
"line": 58,
"column": 37
}
}
},
"property": {
"type": "Identifier",
"name": "_next",
"range": [
2242,
2247
],
"loc": {
"start": {
"line": 58,
"column": 38
},
"end": {
"line": 58,
"column": 43
}
}
},
"range": [
2208,
2247
],
"loc": {
"start": {
"line": 58,
"column": 4
},
"end": {
"line": 58,
"column": 43
}
}
},
"right": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "value",
"range": [
2260,
2265
],
"loc": {
"start": {
"line": 58,
"column": 56
},
"end": {
"line": 58,
"column": 61
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "value",
"range": [
2277,
2282
],
"loc": {
"start": {
"line": 59,
"column": 8
},
"end"