@snailycfx/nexus 1.0.4 → 1.0.6

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 +1 @@
1
- export type EventClass = new (...args: unknown[]) => object;
1
+ export type EventClass = new (...args: never[]) => object;
@@ -1,6 +1,5 @@
1
1
  import { EventClass } from "../EventClass";
2
- export declare class NexusMetadata {
3
- private static readonly store;
4
- static define(key: string, paramTypes: EventClass[], methodName: string): void;
5
- static getEventClass(methodName: string): EventClass | undefined;
6
- }
2
+ export declare const NexusMetadata: {
3
+ define(key: string, paramTypes: EventClass[], methodName: string): void;
4
+ getEventClass(methodName: string): EventClass | undefined;
5
+ };
@@ -1,37 +1,22 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
- local NexusMetadata
3
- do
4
- NexusMetadata = setmetatable({}, {
5
- __tostring = function()
6
- return "NexusMetadata"
7
- end,
8
- })
9
- NexusMetadata.__index = NexusMetadata
10
- function NexusMetadata.new(...)
11
- local self = setmetatable({}, NexusMetadata)
12
- return self:constructor(...) or self
13
- end
14
- function NexusMetadata:constructor()
15
- end
16
- function NexusMetadata:define(key, paramTypes, methodName)
2
+ local store = {}
3
+ local NexusMetadata = {
4
+ define = function(self, key, paramTypes, methodName)
17
5
  if key ~= "paramtypes" then
18
6
  return nil
19
7
  end
20
8
  if #paramTypes == 0 then
21
9
  return nil
22
10
  end
23
- local _store = NexusMetadata.store
24
11
  local _methodName = methodName
25
12
  local _arg1 = paramTypes[1]
26
- _store[_methodName] = _arg1
27
- end
28
- function NexusMetadata:getEventClass(methodName)
29
- local _store = NexusMetadata.store
13
+ store[_methodName] = _arg1
14
+ end,
15
+ getEventClass = function(self, methodName)
30
16
  local _methodName = methodName
31
- return _store[_methodName]
32
- end
33
- NexusMetadata.store = {}
34
- end
17
+ return store[_methodName]
18
+ end,
19
+ }
35
20
  return {
36
21
  NexusMetadata = NexusMetadata,
37
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snailycfx/nexus",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Bukkit-inspired framework for roblox-ts",
5
5
  "main": "out/init.lua",
6
6
  "types": "out/index.d.ts",