@snailycfx/nexus 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventClass } from "../EventClass";
|
|
2
2
|
export declare const NexusMetadata: {
|
|
3
|
-
define(key: string, paramTypes: EventClass[], methodName: string): void;
|
|
4
|
-
getEventClass(methodName: string): EventClass | undefined;
|
|
3
|
+
define(this: void, key: string, paramTypes: EventClass[], methodName: string): void;
|
|
4
|
+
getEventClass(this: void, methodName: string): EventClass | undefined;
|
|
5
5
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local store = {}
|
|
3
3
|
local NexusMetadata = {
|
|
4
|
-
define = function(
|
|
4
|
+
define = function(key, paramTypes, methodName)
|
|
5
5
|
if key ~= "paramtypes" then
|
|
6
6
|
return nil
|
|
7
7
|
end
|
|
@@ -12,7 +12,7 @@ local NexusMetadata = {
|
|
|
12
12
|
local _arg1 = paramTypes[1]
|
|
13
13
|
store[_methodName] = _arg1
|
|
14
14
|
end,
|
|
15
|
-
getEventClass = function(
|
|
15
|
+
getEventClass = function(methodName)
|
|
16
16
|
local _methodName = methodName
|
|
17
17
|
return store[_methodName]
|
|
18
18
|
end,
|
|
@@ -4,7 +4,7 @@ local NexusMetadata = TS.import(script, script.Parent.Parent, "core", "metadata"
|
|
|
4
4
|
local EVENT_HANDLER_KEY = "__nexus_event_handlers__"
|
|
5
5
|
local function EventHandler(options)
|
|
6
6
|
return function(target, methodName)
|
|
7
|
-
local eventClass = NexusMetadata
|
|
7
|
+
local eventClass = NexusMetadata.getEventClass(methodName)
|
|
8
8
|
if eventClass == nil then
|
|
9
9
|
return nil
|
|
10
10
|
end
|