UNPKG

gs-events

Version:

事件分发器(同步)

1,622 lines (1,621 loc) 289 kB
{ "type": "File", "start": 0, "end": 5417, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 150, "column": 1 } }, "program": { "type": "Program", "start": 0, "end": 5417, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 150, "column": 1 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 2394, "end": 2444, "loc": { "start": { "line": 38, "column": 0 }, "end": { "line": 38, "column": 50 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 2401, "end": 2417, "loc": { "start": { "line": 38, "column": 7 }, "end": { "line": 38, "column": 23 } }, "local": { "type": "Identifier", "start": 2401, "end": 2417, "loc": { "start": { "line": 38, "column": 7 }, "end": { "line": 38, "column": 23 }, "identifierName": "IEventDispatcher" }, "name": "IEventDispatcher", "leadingComments": null }, "leadingComments": null } ], "source": { "type": "StringLiteral", "start": 2423, "end": 2443, "loc": { "start": { "line": 38, "column": 29 }, "end": { "line": 38, "column": 49 } }, "extra": { "rawValue": "./IEventDispatcher", "raw": "\"./IEventDispatcher\"" }, "value": "./IEventDispatcher" }, "leadingComments": [ { "type": "CommentLine", "value": "/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", "start": 0, "end": 78, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 78 } } }, { "type": "CommentLine", "value": "/ @Copyright ~2018 ☜Samlv9☞ and other contributors", "start": 79, "end": 131, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 52 } } }, { "type": "CommentLine", "value": "/ @MIT-LICENSE | 1.0.0 | https://api.guless.com/", "start": 132, "end": 182, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 50 } } }, { "type": "CommentLine", "value": "/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", "start": 183, "end": 261, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 78 } } }, { "type": "CommentLine", "value": "/ }|", "start": 262, "end": 313, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 51 } } }, { "type": "CommentLine", "value": "/ }|", "start": 314, "end": 365, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 51 } } }, { "type": "CommentLine", "value": "/ }|   へ    /| ", "start": 366, "end": 435, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 69 } } }, { "type": "CommentLine", "value": "/ _______ _______ ______ }| / │   / /", "start": 436, "end": 502, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 66 } } }, { "type": "CommentLine", "value": "/ / ___ | |_ __ \\ .' ____ '. }| │ Z _,< /   /`ヽ", "start": 503, "end": 574, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 9, "column": 71 } } }, { "type": "CommentLine", "value": "/ | (__ \\_| | |__) | | (____) | }| │     ヽ   /  〉", "start": 575, "end": 645, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 10, "column": 70 } } }, { "type": "CommentLine", "value": "/ '.___`-. | __ / '_.____. | }| Y     `  /  /", "start": 646, "end": 716, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 11, "column": 70 } } }, { "type": "CommentLine", "value": "/ |`\\____) | _| | \\ \\_ | \\____| | }| イ● 、 ●  ⊂⊃〈  /", "start": 717, "end": 786, "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 12, "column": 69 } } }, { "type": "CommentLine", "value": "/ |_______.' |____| |___| \\______,' }| ()  v    | \〈", "start": 787, "end": 855, "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 13, "column": 68 } } }, { "type": "CommentLine", "value": "/ |=========================================\\|  >ー 、_  ィ  │ //", "start": 856, "end": 926, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 14, "column": 70 } } }, { "type": "CommentLine", "value": "/ |> LESS IS MORE || / へ   / ノ<|\\", "start": 927, "end": 996, "loc": { "start": { "line": 15, "column": 0 }, "end": { "line": 15, "column": 69 } } }, { "type": "CommentLine", "value": "/ `=========================================/| ヽ_ノ  (_/  │//", "start": 997, "end": 1065, "loc": { "start": { "line": 16, "column": 0 }, "end": { "line": 16, "column": 68 } } }, { "type": "CommentLine", "value": "/ }| 7       |/", "start": 1066, "end": 1133, "loc": { "start": { "line": 17, "column": 0 }, "end": { "line": 17, "column": 67 } } }, { "type": "CommentLine", "value": "/ }| >―r ̄ ̄`ー―_`", "start": 1134, "end": 1200, "loc": { "start": { "line": 18, "column": 0 }, "end": { "line": 18, "column": 66 } } }, { "type": "CommentLine", "value": "/ }|", "start": 1201, "end": 1252, "loc": { "start": { "line": 19, "column": 0 }, "end": { "line": 19, "column": 51 } } }, { "type": "CommentLine", "value": "/ }|", "start": 1253, "end": 1304, "loc": { "start": { "line": 20, "column": 0 }, "end": { "line": 20, "column": 51 } } }, { "type": "CommentLine", "value": "/ Permission is hereby granted, free of charge, to any person obtaining a copy", "start": 1305, "end": 1385, "loc": { "start": { "line": 21, "column": 0 }, "end": { "line": 21, "column": 80 } } }, { "type": "CommentLine", "value": "/ of this software and associated documentation files (the \"Software\"), to deal", "start": 1386, "end": 1467, "loc": { "start": { "line": 22, "column": 0 }, "end": { "line": 22, "column": 81 } } }, { "type": "CommentLine", "value": "/ in the Software without restriction, including without limitation the rights", "start": 1468, "end": 1548, "loc": { "start": { "line": 23, "column": 0 }, "end": { "line": 23, "column": 80 } } }, { "type": "CommentLine", "value": "/ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", "start": 1549, "end": 1626, "loc": { "start": { "line": 24, "column": 0 }, "end": { "line": 24, "column": 77 } } }, { "type": "CommentLine", "value": "/ copies of the Software, and to permit persons to whom the Software is", "start": 1627, "end": 1700, "loc": { "start": { "line": 25, "column": 0 }, "end": { "line": 25, "column": 73 } } }, { "type": "CommentLine", "value": "/ furnished to do so, subject to the following conditions:", "start": 1701, "end": 1761, "loc": { "start": { "line": 26, "column": 0 }, "end": { "line": 26, "column": 60 } } }, { "type": "CommentLine", "value": "/", "start": 1762, "end": 1765, "loc": { "start": { "line": 27, "column": 0 }, "end": { "line": 27, "column": 3 } } }, { "type": "CommentLine", "value": "/ The above copyright notice and this permission notice shall be included in all", "start": 1766, "end": 1848, "loc": { "start": { "line": 28, "column": 0 }, "end": { "line": 28, "column": 82 } } }, { "type": "CommentLine", "value": "/ copies or substantial portions of the Software.", "start": 1849, "end": 1900, "loc": { "start": { "line": 29, "column": 0 }, "end": { "line": 29, "column": 51 } } }, { "type": "CommentLine", "value": "/", "start": 1901, "end": 1904, "loc": { "start": { "line": 30, "column": 0 }, "end": { "line": 30, "column": 3 } } }, { "type": "CommentLine", "value": "/ THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", "start": 1905, "end": 1983, "loc": { "start": { "line": 31, "column": 0 }, "end": { "line": 31, "column": 78 } } }, { "type": "CommentLine", "value": "/ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", "start": 1984, "end": 2060, "loc": { "start": { "line": 32, "column": 0 }, "end": { "line": 32, "column": 76 } } }, { "type": "CommentLine", "value": "/ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", "start": 2061, "end": 2140, "loc": { "start": { "line": 33, "column": 0 }, "end": { "line": 33, "column": 79 } } }, { "type": "CommentLine", "value": "/ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", "start": 2141, "end": 2215, "loc": { "start": { "line": 34, "column": 0 }, "end": { "line": 34, "column": 74 } } }, { "type": "CommentLine", "value": "/ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", "start": 2216, "end": 2297, "loc": { "start": { "line": 35, "column": 0 }, "end": { "line": 35, "column": 81 } } }, { "type": "CommentLine", "value": "/ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN", "start": 2298, "end": 2375, "loc": { "start": { "line": 36, "column": 0 }, "end": { "line": 36, "column": 77 } } }, { "type": "CommentLine", "value": "/ THE SOFTWARE.", "start": 2376, "end": 2393, "loc": { "start": { "line": 37, "column": 0 }, "end": { "line": 37, "column": 17 } } } ] }, { "type": "ImportDeclaration", "start": 2445, "end": 2505, "loc": { "start": { "line": 39, "column": 0 }, "end": { "line": 39, "column": 60 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 2452, "end": 2473, "loc": { "start": { "line": 39, "column": 7 }, "end": { "line": 39, "column": 28 } }, "local": { "type": "Identifier", "start": 2452, "end": 2473, "loc": { "start": { "line": 39, "column": 7 }, "end": { "line": 39, "column": 28 }, "identifierName": "IEventListenerOptions" }, "name": "IEventListenerOptions" } } ], "source": { "type": "StringLiteral", "start": 2479, "end": 2504, "loc": { "start": { "line": 39, "column": 34 }, "end": { "line": 39, "column": 59 } }, "extra": { "rawValue": "./IEventListenerOptions", "raw": "\"./IEventListenerOptions\"" }, "value": "./IEventListenerOptions" }, "trailingComments": [ { "type": "CommentBlock", "value": "*\n * 定义侦听器配置选项。\n * @implements {IEventListenerOptions}\n * @see {@link EventListener}\n * @see {@link EventDispatcher}\n * @since 1.0.0\n ", "start": 2507, "end": 2645, "loc": { "start": { "line": 41, "column": 0 }, "end": { "line": 47, "column": 3 } } } ] }, { "type": "ExportDefaultDeclaration", "start": 2646, "end": 5417, "loc": { "start": { "line": 48, "column": 0 }, "end": { "line": 150, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 2661, "end": 5417, "loc": { "start": { "line": 48, "column": 15 }, "end": { "line": 150, "column": 1 } }, "id": { "type": "Identifier", "start": 2667, "end": 2687, "loc": { "start": { "line": 48, "column": 21 }, "end": { "line": 48, "column": 41 }, "identifierName": "EventListenerOptions" }, "name": "EventListenerOptions", "leadingComments": null, "trailingComments": [ { "type": "CommentBlock", "value": "< implements IEventListenerOptions >", "start": 2688, "end": 2728, "loc": { "start": { "line": 48, "column": 42 }, "end": { "line": 48, "column": 82 } } } ] }, "superClass": null, "body": { "type": "ClassBody", "start": 2729, "end": 5417, "loc": { "start": { "line": 48, "column": 83 }, "end": { "line": 150, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 3060, "end": 3512, "loc": { "start": { "line": 58, "column": 4 }, "end": { "line": 78, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 3060, "end": 3071, "loc": { "start": { "line": 58, "column": 4 }, "end": { "line": 58, "column": 15 }, "identifierName": "constructor" }, "name": "constructor", "leadingComments": null }, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "AssignmentPattern", "start": 3073, "end": 3085, "loc": { "start": { "line": 58, "column": 17 }, "end": { "line": 58, "column": 29 } }, "left": { "type": "Identifier", "start": 3073, "end": 3078, "loc": { "start": { "line": 58, "column": 17 }, "end": { "line": 58, "column": 22 }, "identifierName": "scope" }, "name": "scope" }, "right": { "type": "NullLiteral", "start": 3081, "end": 3085, "loc": { "start": { "line": 58, "column": 25 }, "end": { "line": 58, "column": 29 } } } }, { "type": "AssignmentPattern", "start": 3087, "end": 3099, "loc": { "start": { "line": 58, "column": 31 }, "end": { "line": 58, "column": 43 } }, "left": { "type": "Identifier", "start": 3087, "end": 3091, "loc": { "start": { "line": 58, "column": 31 }, "end": { "line": 58, "column": 35 }, "identifierName": "once" }, "name": "once" }, "right": { "type": "BooleanLiteral", "start": 3094, "end": 3099, "loc": { "start": { "line": 58, "column": 38 }, "end": { "line": 58, "column": 43 } }, "value": false } }, { "type": "AssignmentPattern", "start": 3101, "end": 3119, "loc": { "start": { "line": 58, "column": 45 }, "end": { "line": 58, "column": 63 } }, "left": { "type": "Identifier", "start": 3101, "end": 3111, "loc": { "start": { "line": 58, "column": 45 }, "end": { "line": 58, "column": 55 }, "identifierName": "useCapture" }, "name": "useCapture" }, "right": { "type": "BooleanLiteral", "start": 3114, "end": 3119, "loc": { "start": { "line": 58, "column": 58 }, "end": { "line": 58, "column": 63 } }, "value": false } }, { "type": "AssignmentPattern", "start": 3121, "end": 3133, "loc": { "start": { "line": 58, "column": 65 }, "end": { "line": 58, "column": 77 } }, "left": { "type": "Identifier", "start": 3121, "end": 3129, "loc": { "start": { "line": 58, "column": 65 }, "end": { "line": 58, "column": 73 }, "identifierName": "priority" }, "name": "priority" }, "right": { "type": "NumericLiteral", "start": 3132, "end": 3133, "loc": { "start": { "line": 58, "column": 76 }, "end": { "line": 58, "column": 77 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 } } ], "body": { "type": "BlockStatement", "start": 3136, "end": 3512, "loc": { "start": { "line": 58, "column": 80 }, "end": { "line": 78, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 3206, "end": 3226, "loc": { "start": { "line": 62, "column": 8 }, "end": { "line": 62, "column": 28 } }, "expression": { "type": "AssignmentExpression", "start": 3206, "end": 3225, "loc": { "start": { "line": 62, "column": 8 }, "end": { "line": 62, "column": 27 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 3206, "end": 3217, "loc": { "start": { "line": 62, "column": 8 }, "end": { "line": 62, "column": 19 } }, "object": { "type": "ThisExpression", "start": 3206, "end": 3210, "loc": { "start": { "line": 62, "column": 8 }, "end": { "line": 62, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 3211, "end": 3217, "loc": { "start": { "line": 62, "column": 13 }, "end": { "line": 62, "column": 19 }, "identifierName": "_scope" }, "name": "_scope" }, "computed": false, "leadingComments": null }, "right": { "type": "Identifier", "start": 3220, "end": 3225, "loc": { "start": { "line": 62, "column": 22 }, "end": { "line": 62, "column": 27 }, "identifierName": "scope" }, "name": "scope" }, "leadingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\n * @type {IEventDispatcher}\n ", "start": 3146, "end": 3197, "loc": { "start": { "line": 59, "column": 8 }, "end": { "line": 61, "column": 11 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": "*\n * @type {Boolean}\n ", "start": 3244, "end": 3286, "loc": { "start": { "line": 64, "column": 8 }, "end": { "line": 66, "column": 11 } } } ] }, { "type": "ExpressionStatement", "start": 3295, "end": 3313, "loc": { "start": { "line": 67, "column": 8 }, "end": { "line": 67, "column": 26 } }, "expression": { "type": "AssignmentExpression", "start": 3295, "end": 3312, "loc": { "start": { "line": 67, "column": 8 }, "end": { "line": 67, "column": 25 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 3295, "end": 3305, "loc": { "start": { "line": 67, "column": 8 }, "end": { "line": 67, "column": 18 } }, "object": { "type": "ThisExpression", "start": 3295, "end": 3299, "loc": { "start": { "line": 67, "column": 8 }, "end": { "line": 67, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 3300, "end": 3305, "loc": { "start": { "line": 67, "column": 13 }, "end": { "line": 67, "column": 18 }, "identifierName": "_once" }, "name": "_once" }, "computed": false, "leadingComments": null }, "right": { "type": "Identifier", "start": 3308, "end": 3312, "loc": { "start": { "line": 67, "column": 21 }, "end": { "line": 67, "column": 25 }, "identifierName": "once" }, "name": "once" }, "leadingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\n * @type {Boolean}\n ", "start": 3244, "end": 3286, "loc": { "start": { "line": 64, "column": 8 }, "end": { "line": 66, "column": 11 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": "*\n * @type {Boolean}\n ", "start": 3331, "end": 3373, "loc": { "start": { "line": 69, "column": 8 }, "end": { "line": 71, "column": 11 } } } ] }, { "type": "ExpressionStatement", "start": 3382, "end": 3412, "loc": { "start": { "line": 72, "column": 8 }, "end": { "line": 72, "column": 38 } }, "expression": { "type": "AssignmentExpression", "start": 3382, "end": 3411, "loc": { "start": { "line": 72, "column": 8 }, "end": { "line": 72, "column": 37 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 3382, "end": 3398, "loc": { "start": { "line": 72, "column": 8 }, "end": { "line": 72, "column": 24 } }, "object": { "type": "ThisExpression", "start": 3382, "end": 3386, "loc": { "start": { "line": 72, "column": 8 }, "end": { "line": 72, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 3387, "end": 3398, "loc": { "start": { "line": 72, "column": 13 }, "end": { "line": 72, "column": 24 }, "identifierName": "_useCapture" }, "name": "_useCapture" }, "computed": false, "leadingComments": null }, "right": { "type": "Identifier", "start": 3401, "end": 3411, "loc": { "start": { "line": 72, "column": 27 }, "end": { "line": 72, "column": 37 }, "identifierName": "useCapture" }, "name": "useCapture" }, "leadingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\n * @type {Boolean}\n ", "start": 3331, "end": 3373, "loc": { "start": { "line": 69, "column": 8 }, "end": { "line": 71, "column": 11 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": "*\n * @type {Number}\n ", "start": 3430, "end": 3471, "loc": { "start": { "line": 74, "column": 8 }, "end": { "line": 76, "column": 11 } } } ] }, { "type": "ExpressionStatement", "start": 3480, "end": 3506, "loc": { "start": { "line": 77, "column": 8 }, "end": { "line": 77, "column": 34 } }, "expression": { "type": "AssignmentExpression", "start": 3480, "end": 3505, "loc": { "start": { "line": 77, "column": 8 }, "end": { "line": 77, "column": 33 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 3480, "end": 3494, "loc": { "start": { "line": 77, "column": 8 }, "end": { "line": 77, "column": 22 } }, "object": { "type": "ThisExpression", "start": 3480, "end": 3484, "loc": { "start": { "line": 77, "column": 8 }, "end": { "line": 77, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 3485, "end": 3494, "loc": { "start": { "line": 77, "column": 13 }, "end": { "line": 77, "column": 22 }, "identifierName": "_priority" }, "name": "_priority" }, "computed": false, "leadingComments": null }, "right": { "type": "Identifier", "start": 3497, "end": 3505, "loc": { "start": { "line": 77, "column": 25 }, "end": { "line": 77, "column": 33 }, "identifierName": "priority" }, "name": "priority" }, "leadingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\n * @type {Number}\n ", "start": 3430,