@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,310 lines (1,309 loc) • 127 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Subject",
"range": [
9,
16
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 16
}
}
},
"imported": {
"type": "Identifier",
"name": "Subject",
"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": "./Subject",
"raw": "'./Subject'",
"range": [
24,
35
],
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 35
}
}
},
"range": [
0,
36
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 36
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "ObjectUnsubscribedError",
"range": [
46,
69
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 32
}
}
},
"imported": {
"type": "Identifier",
"name": "ObjectUnsubscribedError",
"range": [
46,
69
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 32
}
}
},
"range": [
46,
69
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 32
}
}
}
],
"source": {
"type": "Literal",
"value": "./util/ObjectUnsubscribedError",
"raw": "'./util/ObjectUnsubscribedError'",
"range": [
77,
109
],
"loc": {
"start": {
"line": 2,
"column": 40
},
"end": {
"line": 2,
"column": 72
}
}
},
"range": [
37,
110
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 73
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * @class BehaviorSubject<T>\n ",
"range": [
111,
147
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 5,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "BehaviorSubject",
"range": [
159,
174
],
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 26
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "_super",
"range": [
188,
194
],
"loc": {
"start": {
"line": 6,
"column": 40
},
"end": {
"line": 6,
"column": 46
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "__extends",
"range": [
202,
211
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 13
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "BehaviorSubject",
"range": [
212,
227
],
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 29
}
}
},
{
"type": "Identifier",
"name": "_super",
"range": [
229,
235
],
"loc": {
"start": {
"line": 7,
"column": 31
},
"end": {
"line": 7,
"column": 37
}
}
}
],
"range": [
202,
236
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 38
}
}
},
"range": [
202,
237
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 39
}
}
},
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "BehaviorSubject",
"range": [
251,
266
],
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 28
}
}
},
"params": [
{
"type": "Identifier",
"name": "_value",
"range": [
267,
273
],
"loc": {
"start": {
"line": 8,
"column": 29
},
"end": {
"line": 8,
"column": 35
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "_super",
"range": [
285,
291
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 14
}
}
},
"property": {
"type": "Identifier",
"name": "call",
"range": [
292,
296
],
"loc": {
"start": {
"line": 9,
"column": 15
},
"end": {
"line": 9,
"column": 19
}
}
},
"range": [
285,
296
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 19
}
}
},
"arguments": [
{
"type": "ThisExpression",
"range": [
297,
301
],
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 24
}
}
}
],
"range": [
285,
302
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 25
}
}
},
"range": [
285,
303
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 26
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
312,
316
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "_value",
"range": [
317,
323
],
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 19
}
}
},
"range": [
312,
323
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 19
}
}
},
"right": {
"type": "Identifier",
"name": "_value",
"range": [
326,
332
],
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 28
}
}
},
"range": [
312,
332
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 28
}
}
},
"range": [
312,
333
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 29
}
}
}
],
"range": [
275,
339
],
"loc": {
"start": {
"line": 8,
"column": 37
},
"end": {
"line": 11,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
242,
339
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 11,
"column": 5
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Object",
"range": [
344,
350
],
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 10
}
}
},
"property": {
"type": "Identifier",
"name": "defineProperty",
"range": [
351,
365
],
"loc": {
"start": {
"line": 12,
"column": 11
},
"end": {
"line": 12,
"column": 25
}
}
},
"range": [
344,
365
],
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 25
}
}
},
"arguments": [
{
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "BehaviorSubject",
"range": [
366,
381
],
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 41
}
}
},
"property": {
"type": "Identifier",
"name": "prototype",
"range": [
382,
391
],
"loc": {
"start": {
"line": 12,
"column": 42
},
"end": {
"line": 12,
"column": 51
}
}
},
"range": [
366,
391
],
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 51
}
}
},
{
"type": "Literal",
"value": "value",
"raw": "\"value\"",
"range": [
393,
400
],
"loc": {
"start": {
"line": 12,
"column": 53
},
"end": {
"line": 12,
"column": 60
}
}
},
{
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "get",
"range": [
412,
415
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 11
}
}
},
"value": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
450,
454
],
"loc": {
"start": {
"line": 14,
"column": 19
},
"end": {
"line": 14,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"name": "getValue",
"range": [
455,
463
],
"loc": {
"start": {
"line": 14,
"column": 24
},
"end": {
"line": 14,
"column": 32
}
}
},
"range": [
450,
463
],
"loc": {
"start": {
"line": 14,
"column": 19
},
"end": {
"line": 14,
"column": 32
}
}
},
"arguments": [],
"range": [
450,
465
],
"loc": {
"start": {
"line": 14,
"column": 19
},
"end": {
"line": 14,
"column": 34
}
}
},
"range": [
443,
466
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 35
}
}
}
],
"range": [
429,
476
],
"loc": {
"start": {
"line": 13,
"column": 25
},
"end": {
"line": 15,
"column": 9
}
}
},
"generator": false,
"expression": false,
"range": [
417,
476
],
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 15,
"column": 9
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
412,
476
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 15,
"column": 9
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "enumerable",
"range": [
486,
496
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 18
}
}
},
"value": {
"type": "Literal",
"value": true,
"raw": "true",
"range": [
498,
502
],
"loc": {
"start": {
"line": 16,
"column": 20
},
"end": {
"line": 16,
"column": 24
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
486,
502
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 24
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "configurable",
"range": [
512,
524
],
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 20
}
}
},
"value": {
"type": "Literal",
"value": true,
"raw": "true",
"range": [
526,
530
],
"loc": {
"start": {
"line": 17,
"column": 22
},
"end": {
"line": 17,
"column": 26
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
512,
530
],
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 26
}
}
}
],
"range": [
402,
536
],
"loc": {
"start": {
"line": 12,
"column": 62
},
"end": {
"line": 18,
"column": 5
}
}
}
],
"range": [
344,
537
],
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 18,
"column": 6
}
}
},
"range": [
344,
538
],
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 18,
"column": 7
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "BehaviorSubject",
"range": [
543,
558
],
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "prototype",
"range": [
559,
568
],
"loc": {
"start": {
"line": 19,
"column": 20
},
"end": {
"line": 19,
"column": 29
}
}
},
"range": [
543,
568
],
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 29
}
}
},
"property": {
"type": "Identifier",
"name": "_subscribe",
"range": [
569,
579
],
"loc": {
"start": {
"line": 19,
"column": 30
},
"end": {
"line": 19,
"column": 40
}
}
},
"range": [
543,
579
],
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 40
}
}
},
"right": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "subscriber",
"range": [
592,
602
],
"loc": {
"start": {
"line": 19,
"column": 53
},
"end": {
"line": 19,
"column": 63
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "subscription",
"range": [
618,
630
],
"loc": {
"start": {
"line": 20,
"column": 12
},
"end": {
"line": 20,
"column": 24
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "_super",
"range": [
633,
639
],
"loc": {
"start": {
"line": 20,
"column": 27
},
"end": {
"line": 20,
"column": 33
}
}
},
"property": {
"type": "Identifier",
"name": "prototype",
"range": [
640,
649
],
"loc": {
"start": {
"line": 20,
"column": 34
},
"end": {
"line": 20,
"column": 43
}
}
},
"range": [
633,
649
],
"loc": {
"start": {
"line": 20,
"column": 27
},
"end": {
"line": 20,
"column": 43
}
}
},
"property": {