wuira 0.3.3 → 0.4.0

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +15 -12
  3. package/docs/source-converters.md +5 -5
  4. package/docs/spells.md +1 -1
  5. package/lib/datasources/NativeApi.d.ts +319 -0
  6. package/lib/datasources/NativeApi.lua +1114 -0
  7. package/lib/datasources/UseSource.d.ts +41 -43
  8. package/lib/datasources/index.d.ts +3 -25
  9. package/lib/datasources/index.lua +45 -74
  10. package/lib/helpers/Auras.d.ts +5 -0
  11. package/lib/helpers/Auras.lua +47 -0
  12. package/lib/helpers/Range.d.ts +2 -0
  13. package/lib/helpers/Range.lua +30 -0
  14. package/lib/helpers/index.d.ts +2 -0
  15. package/lib/helpers/index.lua +12 -0
  16. package/lib/index.d.ts +1 -0
  17. package/lib/index.lua +6 -0
  18. package/lib/platform/forever.d.ts +3 -0
  19. package/lib/rendering/progress.lua +5 -150
  20. package/lib/ui/UnitPortrait.d.ts +1 -2
  21. package/lib/ui/UnitPortrait.lua +11 -18
  22. package/package.json +8 -1
  23. package/lib/datasources/AuraTimer.d.ts +0 -21
  24. package/lib/datasources/AuraTimer.lua +0 -334
  25. package/lib/datasources/Auras.d.ts +0 -32
  26. package/lib/datasources/Auras.lua +0 -300
  27. package/lib/datasources/CastTimer.d.ts +0 -9
  28. package/lib/datasources/CastTimer.lua +0 -255
  29. package/lib/datasources/EditModeLayouts.d.ts +0 -33
  30. package/lib/datasources/EditModeLayouts.lua +0 -698
  31. package/lib/datasources/GroupMembers.d.ts +0 -24
  32. package/lib/datasources/GroupMembers.lua +0 -477
  33. package/lib/datasources/GroupRoster.d.ts +0 -28
  34. package/lib/datasources/GroupRoster.lua +0 -622
  35. package/lib/datasources/KnownSpells.d.ts +0 -33
  36. package/lib/datasources/KnownSpells.lua +0 -1077
  37. package/lib/datasources/ManaRegenTimer.d.ts +0 -29
  38. package/lib/datasources/ManaRegenTimer.lua +0 -683
  39. package/lib/datasources/Resources.d.ts +0 -81
  40. package/lib/datasources/Resources.lua +0 -907
  41. package/lib/datasources/SpellCooldown.d.ts +0 -12
  42. package/lib/datasources/SpellCooldown.lua +0 -240
  43. package/lib/datasources/SpellSource.d.ts +0 -14
  44. package/lib/datasources/SpellSource.lua +0 -236
  45. package/lib/datasources/SwingTimer.d.ts +0 -31
  46. package/lib/datasources/SwingTimer.lua +0 -650
  47. package/lib/datasources/TotemTimer.d.ts +0 -10
  48. package/lib/datasources/TotemTimer.lua +0 -275
  49. package/lib/datasources/UnitInfo.d.ts +0 -51
  50. package/lib/datasources/UnitInfo.lua +0 -801
  51. package/lib/datasources/UnitSource.d.ts +0 -38
  52. package/lib/datasources/UnitSource.lua +0 -613
@@ -1,622 +0,0 @@
1
- --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
- -- Lua Library inline imports
3
- local __TS__StringReplace
4
- do
5
- local sub = string.sub
6
- function __TS__StringReplace(source, searchValue, replaceValue)
7
- local startPos, endPos = string.find(source, searchValue, nil, true)
8
- if not startPos then
9
- return source
10
- end
11
- local before = sub(source, 1, startPos - 1)
12
- local replacement = type(replaceValue) == "string" and replaceValue or replaceValue(nil, searchValue, startPos - 1, source)
13
- local after = sub(source, endPos + 1)
14
- return (before .. replacement) .. after
15
- end
16
- end
17
-
18
- local function __TS__Class(self)
19
- local c = {prototype = {}}
20
- c.prototype.__index = c.prototype
21
- c.prototype.constructor = c
22
- return c
23
- end
24
-
25
- local function __TS__ClassExtends(target, base)
26
- target.____super = base
27
- local staticMetatable = setmetatable({__index = base}, base)
28
- setmetatable(target, staticMetatable)
29
- local baseMetatable = getmetatable(base)
30
- if baseMetatable then
31
- if type(baseMetatable.__index) == "function" then
32
- staticMetatable.__index = baseMetatable.__index
33
- end
34
- if type(baseMetatable.__newindex) == "function" then
35
- staticMetatable.__newindex = baseMetatable.__newindex
36
- end
37
- end
38
- setmetatable(target.prototype, base.prototype)
39
- if type(base.prototype.__index) == "function" then
40
- target.prototype.__index = base.prototype.__index
41
- end
42
- if type(base.prototype.__newindex) == "function" then
43
- target.prototype.__newindex = base.prototype.__newindex
44
- end
45
- if type(base.prototype.__tostring) == "function" then
46
- target.prototype.__tostring = base.prototype.__tostring
47
- end
48
- end
49
-
50
- local __TS__Symbol, Symbol
51
- do
52
- local symbolMetatable = {__tostring = function(self)
53
- return ("Symbol(" .. (self.description or "")) .. ")"
54
- end}
55
- function __TS__Symbol(description)
56
- return setmetatable({description = description}, symbolMetatable)
57
- end
58
- Symbol = {
59
- asyncDispose = __TS__Symbol("Symbol.asyncDispose"),
60
- dispose = __TS__Symbol("Symbol.dispose"),
61
- iterator = __TS__Symbol("Symbol.iterator"),
62
- hasInstance = __TS__Symbol("Symbol.hasInstance"),
63
- species = __TS__Symbol("Symbol.species"),
64
- toStringTag = __TS__Symbol("Symbol.toStringTag")
65
- }
66
- end
67
-
68
- local __TS__Iterator
69
- do
70
- local function iteratorGeneratorStep(self)
71
- local co = self.____coroutine
72
- local status, value = coroutine.resume(co)
73
- if not status then
74
- error(value, 0)
75
- end
76
- if coroutine.status(co) == "dead" then
77
- return
78
- end
79
- return true, value
80
- end
81
- local function iteratorIteratorStep(self)
82
- local result = self:next()
83
- if result.done then
84
- return
85
- end
86
- return true, result.value
87
- end
88
- local function iteratorStringStep(self, index)
89
- index = index + 1
90
- if index > #self then
91
- return
92
- end
93
- return index, string.sub(self, index, index)
94
- end
95
- function __TS__Iterator(iterable)
96
- if type(iterable) == "string" then
97
- return iteratorStringStep, iterable, 0
98
- elseif iterable.____coroutine ~= nil then
99
- return iteratorGeneratorStep, iterable
100
- elseif iterable[Symbol.iterator] then
101
- local iterator = iterable[Symbol.iterator](iterable)
102
- return iteratorIteratorStep, iterator
103
- else
104
- return ipairs(iterable)
105
- end
106
- end
107
- end
108
-
109
- local Map
110
- do
111
- Map = __TS__Class()
112
- Map.name = "Map"
113
- function Map.prototype.____constructor(self, entries)
114
- self[Symbol.toStringTag] = "Map"
115
- self.items = {}
116
- self.size = 0
117
- self.nextKey = {}
118
- self.previousKey = {}
119
- if entries == nil then
120
- return
121
- end
122
- local iterable = entries
123
- if iterable[Symbol.iterator] then
124
- local iterator = iterable[Symbol.iterator](iterable)
125
- while true do
126
- local result = iterator:next()
127
- if result.done then
128
- break
129
- end
130
- local value = result.value
131
- self:set(value[1], value[2])
132
- end
133
- else
134
- local array = entries
135
- for ____, kvp in ipairs(array) do
136
- self:set(kvp[1], kvp[2])
137
- end
138
- end
139
- end
140
- function Map.prototype.clear(self)
141
- self.items = {}
142
- self.nextKey = {}
143
- self.previousKey = {}
144
- self.firstKey = nil
145
- self.lastKey = nil
146
- self.size = 0
147
- end
148
- function Map.prototype.delete(self, key)
149
- local contains = self:has(key)
150
- if contains then
151
- self.size = self.size - 1
152
- local next = self.nextKey[key]
153
- local previous = self.previousKey[key]
154
- if next ~= nil and previous ~= nil then
155
- self.nextKey[previous] = next
156
- self.previousKey[next] = previous
157
- elseif next ~= nil then
158
- self.firstKey = next
159
- self.previousKey[next] = nil
160
- elseif previous ~= nil then
161
- self.lastKey = previous
162
- self.nextKey[previous] = nil
163
- else
164
- self.firstKey = nil
165
- self.lastKey = nil
166
- end
167
- self.nextKey[key] = nil
168
- self.previousKey[key] = nil
169
- end
170
- self.items[key] = nil
171
- return contains
172
- end
173
- function Map.prototype.forEach(self, callback)
174
- for ____, key in __TS__Iterator(self:keys()) do
175
- callback(nil, self.items[key], key, self)
176
- end
177
- end
178
- function Map.prototype.get(self, key)
179
- return self.items[key]
180
- end
181
- function Map.prototype.has(self, key)
182
- return self.nextKey[key] ~= nil or self.lastKey == key
183
- end
184
- function Map.prototype.set(self, key, value)
185
- local isNewValue = not self:has(key)
186
- if isNewValue then
187
- self.size = self.size + 1
188
- end
189
- self.items[key] = value
190
- if self.firstKey == nil then
191
- self.firstKey = key
192
- self.lastKey = key
193
- elseif isNewValue then
194
- self.nextKey[self.lastKey] = key
195
- self.previousKey[key] = self.lastKey
196
- self.lastKey = key
197
- end
198
- return self
199
- end
200
- Map.prototype[Symbol.iterator] = function(self)
201
- return self:entries()
202
- end
203
- function Map.prototype.entries(self)
204
- local function getFirstKey()
205
- return self.firstKey
206
- end
207
- local items = self.items
208
- local nextKey = self.nextKey
209
- local key
210
- local started = false
211
- return {
212
- [Symbol.iterator] = function(self)
213
- return self
214
- end,
215
- next = function(self)
216
- if not started then
217
- started = true
218
- key = getFirstKey(nil)
219
- else
220
- key = nextKey[key]
221
- end
222
- return {done = not key, value = {key, items[key]}}
223
- end
224
- }
225
- end
226
- function Map.prototype.keys(self)
227
- local function getFirstKey()
228
- return self.firstKey
229
- end
230
- local nextKey = self.nextKey
231
- local key
232
- local started = false
233
- return {
234
- [Symbol.iterator] = function(self)
235
- return self
236
- end,
237
- next = function(self)
238
- if not started then
239
- started = true
240
- key = getFirstKey(nil)
241
- else
242
- key = nextKey[key]
243
- end
244
- return {done = not key, value = key}
245
- end
246
- }
247
- end
248
- function Map.prototype.values(self)
249
- local function getFirstKey()
250
- return self.firstKey
251
- end
252
- local items = self.items
253
- local nextKey = self.nextKey
254
- local key
255
- local started = false
256
- return {
257
- [Symbol.iterator] = function(self)
258
- return self
259
- end,
260
- next = function(self)
261
- if not started then
262
- started = true
263
- key = getFirstKey(nil)
264
- else
265
- key = nextKey[key]
266
- end
267
- return {done = not key, value = items[key]}
268
- end
269
- }
270
- end
271
- Map[Symbol.species] = Map
272
- end
273
-
274
- local function __TS__New(target, ...)
275
- local instance = setmetatable({}, target.prototype)
276
- instance:____constructor(...)
277
- return instance
278
- end
279
-
280
- local __TS__Unpack = table.unpack or unpack
281
-
282
- local function __TS__ArrayMap(self, callbackfn, thisArg)
283
- local result = {}
284
- for i = 1, #self do
285
- result[i] = callbackfn(thisArg, self[i], i - 1, self)
286
- end
287
- return result
288
- end
289
-
290
- local function __TS__Number(value)
291
- local valueType = type(value)
292
- if valueType == "number" then
293
- return value
294
- elseif valueType == "string" then
295
- local numberValue = tonumber(value)
296
- if numberValue then
297
- return numberValue
298
- end
299
- if value == "Infinity" then
300
- return math.huge
301
- end
302
- if value == "-Infinity" then
303
- return -math.huge
304
- end
305
- local stringWithoutSpaces = string.gsub(value, "%s", "")
306
- if stringWithoutSpaces == "" then
307
- return 0
308
- end
309
- return 0 / 0
310
- elseif valueType == "boolean" then
311
- return value and 1 or 0
312
- else
313
- return 0 / 0
314
- end
315
- end
316
-
317
- local function __TS__ArraySort(self, compareFn)
318
- if compareFn ~= nil then
319
- table.sort(
320
- self,
321
- function(a, b) return compareFn(nil, a, b) < 0 end
322
- )
323
- else
324
- table.sort(self)
325
- end
326
- return self
327
- end
328
-
329
- local function __TS__StringStartsWith(self, searchString, position)
330
- if position == nil or position < 0 then
331
- position = 0
332
- end
333
- return string.sub(self, position + 1, #searchString + position) == searchString
334
- end
335
-
336
- local function __TS__CloneDescriptor(____bindingPattern0)
337
- local value
338
- local writable
339
- local set
340
- local get
341
- local configurable
342
- local enumerable
343
- enumerable = ____bindingPattern0.enumerable
344
- configurable = ____bindingPattern0.configurable
345
- get = ____bindingPattern0.get
346
- set = ____bindingPattern0.set
347
- writable = ____bindingPattern0.writable
348
- value = ____bindingPattern0.value
349
- local descriptor = {enumerable = enumerable == true, configurable = configurable == true}
350
- local hasGetterOrSetter = get ~= nil or set ~= nil
351
- local hasValueOrWritableAttribute = writable ~= nil or value ~= nil
352
- if hasGetterOrSetter and hasValueOrWritableAttribute then
353
- error("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute.", 0)
354
- end
355
- if get or set then
356
- descriptor.get = get
357
- descriptor.set = set
358
- else
359
- descriptor.value = value
360
- descriptor.writable = writable == true
361
- end
362
- return descriptor
363
- end
364
-
365
- local __TS__DescriptorGet
366
- do
367
- local getmetatable = _G.getmetatable
368
- local ____rawget = _G.rawget
369
- function __TS__DescriptorGet(self, metatable, key)
370
- while metatable do
371
- local rawResult = ____rawget(metatable, key)
372
- if rawResult ~= nil then
373
- return rawResult
374
- end
375
- local descriptors = ____rawget(metatable, "_descriptors")
376
- if descriptors then
377
- local descriptor = descriptors[key]
378
- if descriptor ~= nil then
379
- if descriptor.get then
380
- return descriptor.get(self)
381
- end
382
- return descriptor.value
383
- end
384
- end
385
- metatable = getmetatable(metatable)
386
- end
387
- end
388
- end
389
-
390
- local __TS__DescriptorSet
391
- do
392
- local getmetatable = _G.getmetatable
393
- local ____rawget = _G.rawget
394
- local rawset = _G.rawset
395
- function __TS__DescriptorSet(self, metatable, key, value)
396
- while metatable do
397
- local descriptors = ____rawget(metatable, "_descriptors")
398
- if descriptors then
399
- local descriptor = descriptors[key]
400
- if descriptor ~= nil then
401
- if descriptor.set then
402
- descriptor.set(self, value)
403
- else
404
- if descriptor.writable == false then
405
- error(
406
- ((("Cannot assign to read only property '" .. key) .. "' of object '") .. tostring(self)) .. "'",
407
- 0
408
- )
409
- end
410
- descriptor.value = value
411
- end
412
- return
413
- end
414
- end
415
- metatable = getmetatable(metatable)
416
- end
417
- rawset(self, key, value)
418
- end
419
- end
420
-
421
- local __TS__SetDescriptor
422
- do
423
- local getmetatable = _G.getmetatable
424
- local function descriptorIndex(self, key)
425
- return __TS__DescriptorGet(
426
- self,
427
- getmetatable(self),
428
- key
429
- )
430
- end
431
- local function descriptorNewIndex(self, key, value)
432
- return __TS__DescriptorSet(
433
- self,
434
- getmetatable(self),
435
- key,
436
- value
437
- )
438
- end
439
- function __TS__SetDescriptor(target, key, desc, isPrototype)
440
- if isPrototype == nil then
441
- isPrototype = false
442
- end
443
- local ____isPrototype_0
444
- if isPrototype then
445
- ____isPrototype_0 = target
446
- else
447
- ____isPrototype_0 = getmetatable(target)
448
- end
449
- local metatable = ____isPrototype_0
450
- if not metatable then
451
- metatable = {}
452
- setmetatable(target, metatable)
453
- end
454
- if not isPrototype and not rawget(metatable, "_isOwnDescriptorMetatable") then
455
- local instanceMetatable = {}
456
- instanceMetatable._isOwnDescriptorMetatable = true
457
- setmetatable(instanceMetatable, metatable)
458
- setmetatable(target, instanceMetatable)
459
- metatable = instanceMetatable
460
- end
461
- local value = rawget(target, key)
462
- if value ~= nil then
463
- rawset(target, key, nil)
464
- end
465
- if not rawget(metatable, "_descriptors") then
466
- metatable._descriptors = {}
467
- end
468
- metatable._descriptors[key] = __TS__CloneDescriptor(desc)
469
- metatable.__index = descriptorIndex
470
- metatable.__newindex = descriptorNewIndex
471
- end
472
- end
473
- -- End of Lua Library inline imports
474
- local ____exports = {}
475
- local ____DataSource = require("datasources.DataSource")
476
- local DataSource = ____DataSource.DataSource
477
- local ____Source = require("datasources.Source")
478
- local registerSource = ____Source.registerSource
479
- local ____UseSource = require("datasources.UseSource")
480
- local UseSource = ____UseSource.UseSource
481
- local ____GroupMembers = require("datasources.GroupMembers")
482
- local GroupMembers = ____GroupMembers.GroupMembers
483
- function ____exports.getPetUnitToken(self, unit)
484
- if unit == "player" then
485
- return "pet"
486
- end
487
- return __TS__StringReplace(
488
- __TS__StringReplace(unit, "party", "partypet"),
489
- "raid",
490
- "raidpet"
491
- )
492
- end
493
- --- Small snapshots describe identity/order only; keyed rendering owns widgets and unit sources.
494
- ____exports.GroupRoster = __TS__Class()
495
- local GroupRoster = ____exports.GroupRoster
496
- GroupRoster.name = "GroupRoster"
497
- __TS__ClassExtends(GroupRoster, DataSource)
498
- function GroupRoster.prototype.____constructor(self, scope, options)
499
- if scope == nil then
500
- scope = "auto"
501
- end
502
- if options == nil then
503
- options = {}
504
- end
505
- DataSource.prototype.____constructor(self, {})
506
- self.scope = scope
507
- self.options = options
508
- self.knownNames = __TS__New(Map)
509
- self.snapshot = {}
510
- self.restricted = false
511
- self.roster = UseSource(nil, GroupMembers, scope)
512
- end
513
- function GroupRoster.prototype.GetValue(self)
514
- self.restricted = self.roster:IsSecret()
515
- if self.restricted then
516
- return self.snapshot
517
- end
518
- local units = {__TS__Unpack(self.roster.Value)}
519
- if #units == 0 and self.options.includeSelfWhenSolo then
520
- units = {"player"}
521
- end
522
- local members = __TS__ArrayMap(
523
- units,
524
- function(____, unit) return self:Read(unit, false) end
525
- )
526
- if self.scope == "raid" then
527
- __TS__ArraySort(
528
- members,
529
- function(____, a, b) return __TS__Number(a.group) - __TS__Number(b.group) or __TS__Number(string.sub(a.unit, 5)) - __TS__Number(string.sub(b.unit, 5)) end
530
- )
531
- end
532
- if self.options.pets then
533
- for ____, unit in ipairs(units) do
534
- local pet = ____exports.getPetUnitToken(nil, unit)
535
- local exists = UnitExists(pet)
536
- if not issecretvalue(exists) and exists then
537
- members[#members + 1] = self:Read(pet, true)
538
- end
539
- end
540
- end
541
- self.snapshot = members
542
- return members
543
- end
544
- function GroupRoster.prototype.Read(self, unit, pet)
545
- local rawGUID = UnitGUID(unit)
546
- local ____issecretvalue_result_0
547
- if issecretvalue(rawGUID) then
548
- ____issecretvalue_result_0 = nil
549
- else
550
- ____issecretvalue_result_0 = rawGUID
551
- end
552
- local guid = ____issecretvalue_result_0
553
- local rawName, rawRealm = UnitFullName(unit)
554
- local ____temp_1
555
- if issecretvalue(rawName) or issecretvalue(rawRealm) or rawName == nil then
556
- ____temp_1 = nil
557
- else
558
- ____temp_1 = (rawName .. "-") .. (rawRealm or "")
559
- end
560
- local fullName = ____temp_1
561
- if pet and fullName ~= nil then
562
- local owner = unit == "pet" and "player" or __TS__StringReplace(
563
- __TS__StringReplace(unit, "partypet", "party"),
564
- "raidpet",
565
- "raid"
566
- )
567
- local name, realm = UnitFullName(owner)
568
- fullName = ((not issecretvalue(name) and not issecretvalue(realm) and name ~= nil and (name .. "-") .. (realm or "") or owner) .. "/") .. fullName
569
- end
570
- if guid ~= nil and fullName ~= nil then
571
- self.knownNames:set(fullName, guid)
572
- end
573
- local ____guid_3 = guid
574
- if ____guid_3 == nil then
575
- local ____temp_2
576
- if fullName == nil then
577
- ____temp_2 = nil
578
- else
579
- ____temp_2 = self.knownNames:get(fullName)
580
- end
581
- ____guid_3 = ____temp_2
582
- end
583
- local identity = ____guid_3
584
- local group = "1"
585
- if __TS__StringStartsWith(unit, "raid") and not pet then
586
- local ____, ____, subgroup = GetRaidRosterInfo(__TS__Number(string.sub(unit, 5)))
587
- if not issecretvalue(subgroup) and subgroup ~= nil and subgroup >= 1 and subgroup <= 8 then
588
- group = tostring(subgroup)
589
- end
590
- end
591
- return {
592
- key = identity == nil and "name:" .. (fullName or unit) or "guid:" .. identity,
593
- guid = guid,
594
- unit = unit,
595
- pet = pet,
596
- group = group
597
- }
598
- end
599
- function GroupRoster.prototype.onChange(self, listener)
600
- return self.roster:onChange(function() return listener(nil, self.Value) end)
601
- end
602
- function GroupRoster.prototype.Dispose(self)
603
- self.roster:Dispose()
604
- self.knownNames:clear()
605
- self.snapshot = {}
606
- end
607
- __TS__SetDescriptor(
608
- GroupRoster.prototype,
609
- "Status",
610
- {get = function(self)
611
- return self.restricted and "restricted" or "ready"
612
- end},
613
- true
614
- );
615
- (function(self)
616
- registerSource(
617
- nil,
618
- ____exports.GroupRoster,
619
- function(____, props) return __TS__New(____exports.GroupRoster, props[1], props[2]) end
620
- )
621
- end)(GroupRoster)
622
- return ____exports
@@ -1,33 +0,0 @@
1
- import { DataSource } from "./DataSource";
2
- export type KnownSpellsStatus = "ready" | "unavailable" | "restricted";
3
- export interface KnownSpell {
4
- readonly id: number;
5
- readonly name?: string;
6
- /** Undefined when the client cannot determine whether this spell is passive. */
7
- readonly isPassive?: boolean;
8
- }
9
- /** Cached learned player spellbook IDs. Native events refresh the snapshot; no polling. */
10
- export declare class KnownSpells extends DataSource<readonly number[]> {
11
- private ids;
12
- private entries;
13
- private status;
14
- private readonly listeners;
15
- private readonly frame;
16
- private disposed;
17
- protected constructor();
18
- get Status(): KnownSpellsStatus;
19
- /** Detached cached metadata, with no native reads. Unreadable books return no entries. */
20
- get Entries(): readonly KnownSpell[];
21
- /** Whole-name glob over cached localized names. Supports * and ?, ignoring ASCII case. */
22
- Filter(pattern: string): readonly KnownSpell[];
23
- protected GetValue(): readonly number[];
24
- protected HasSecretFields(): boolean;
25
- /** Representative enum IDs match any learned rank through its localized name. */
26
- Has(spell: number | string): boolean;
27
- /** Resolve a representative spell ID or localized name to a learned rank. */
28
- Find(spell: number | string): KnownSpell | undefined;
29
- /** No initial emission; only changed, readable snapshots reach observers. */
30
- onChange(listener: (spells: readonly number[]) => void): () => void;
31
- private Refresh;
32
- Dispose(): void;
33
- }