Skip to content

Commit

Permalink
Add more types to Types
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanzilla committed Feb 8, 2024
1 parent 0fa6305 commit 2df204e
Show file tree
Hide file tree
Showing 4 changed files with 377 additions and 62 deletions.
4 changes: 3 additions & 1 deletion .luarc.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@
"GetCurrencyListSize",
"FIRST_NUMBER_CAP_NO_SPACE",
"CreateFramePool",
"AceGUIWeakAurasMultiLineEditBoxWithEnterInsertLink"
"AceGUIWeakAurasMultiLineEditBoxWithEnterInsertLink",
"ExpandCurrencyList",
"GetCurrencyListInfo"
],
"runtime.version": "Lua 5.1",
"workspace.ignoreDir": [
Expand Down
4 changes: 0 additions & 4 deletions WeakAuras/Init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ local GetAddOnMetadata = C_AddOns and C_AddOns.GetAddOnMetadata or GetAddOnMetad
--- @field frames table<string, table>
--- @field function_strings table<string, string>
--- @field GetDataByUID fun(uid: uid): auraData
--- @field GetDiscoveredCurrencies fun(): table<number|string, string>
--- @field GetDiscoveredCurrenciesSorted fun(): table<number|string, number>
--- @field GetDiscoveredCurrenciesHeaders fun(): table<string, boolean>
--- @field GetErrorHandlerId fun(id: auraId, context: string): function
--- @field GetErrorHandlerUid fun(uid: uid, context: string): function
--- @field GetRegionByUID fun(uid: uid, cloneId: string): Region
Expand All @@ -83,7 +80,6 @@ local GetAddOnMetadata = C_AddOns and C_AddOns.GetAddOnMetadata or GetAddOnMetad
--- @field orientation_types table<string, string>
--- @field orientation_with_circle_types table<string, string>
--- @field ParseNumber fun (numString: string|number): number?, string?
--- @field point_types table<string, string>
--- @field PreShowModels fun()
--- @field PrintHelp fun()
--- @field QuotedString fun(input: string): string
Expand Down
8 changes: 2 additions & 6 deletions WeakAuras/SubscribableObject.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ local L = WeakAuras.L
--- @class SubscribableObject
--- @field events table<string, frame[]> Subscribers ordered by "priority"
--- @field subscribers table<string, frame> Subscribers lookup
--- @field callback table<string, fun():nil>
--- @field callbacks table<string, fun():nil>
--- @field ClearSubscribers fun(self: SubscribableObject)
--- @field ClearCallbacks fun(self: SubscribableObject)
--- @field AddSubscriber fun(self: SubscribableObject, event: string, subscriber: frame, highPriority: boolean?)
--- @field RemoveSubscriber fun(self: SubscribableObject, event: string, subscriber: frame)
--- @field SetOnSubscriptionStatusChanged fun(self: SubscribableObject, event: string, cb: fun())
--- @field Notify fun(self: SubscribableObject, event: type, ...: any)
--- @field HasSubscribers fun(self: SubscribableObject, event: string): boolean
--- @type SubscribableObject
local SubscribableObject =
{
local SubscribableObject = {
--- @type fun(self: SubscribableObject)
ClearSubscribers = function(self)
self.events = {}
Expand Down Expand Up @@ -55,8 +53,6 @@ local SubscribableObject =
end
end,



--- @type fun(self: SubscribableObject, event: string, subscriber: frame)
RemoveSubscriber = function(self, event, subscriber)
if self.events[event] then
Expand Down
Loading

0 comments on commit 2df204e

Please sign in to comment.