Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Commit

Permalink
Move METAKEY_WELL_KNOWN to Types.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
metatablecat committed Aug 24, 2024
1 parent 5bb71d4 commit 21a1e60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/lib/Types.luau
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
-- for the time being, we should let most stuff pass
-- if you experience problems, please file a Pull request

export type MetakeyWellKnown = "AwaitFor" | "EnableClasses" | "EnableUpdating" | "PluginMetadata" | "TimeoutDisabled"

export type Metakey<A> = typeof(setmetatable(
{} :: {
Key: A,
Expand Down
4 changes: 1 addition & 3 deletions src/meta.luau
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ local function metakey<A>(key): Types.Metakey<A>
})
end

type METAKEY_WELL_KNOWN = "AwaitFor" | "EnableClasses" | "EnableUpdating" | "PluginMetadata" | "TimeoutDisabled"

local MetakeyMemoization = {}

return {
export = function(rhs: METAKEY_WELL_KNOWN | string): Types.Metakey<any>
export = function(rhs: Types.MetakeyWellKnown | string): Types.Metakey<any>
local key = MetakeyMemoization[rhs]
if not key then
key = metakey(rhs)
Expand Down

0 comments on commit 21a1e60

Please sign in to comment.