@vttforge/types / FoundryClassNamespace
Type Alias: FoundryClassNamespace<Known> ​
FoundryClassNamespace<
Known> =Readonly<Record<Known,AnyClass>> &Readonly<Record<string,AnyClass|undefined>>
A namespace of classes, with the names real consumers reach for spelled out.
foundry.data.fields holds a few dozen classes, and restating every one would be restating Foundry. Naming the ones this SDK and its consumers actually use buys the thing that matters: foundry.data.feilds.StringField stops compiling, and a misspelled namespace path is the mistake that survives review and fails in front of a player.
A name outside the list still resolves, as AnyClass | undefined. That is the index signature being honest under noUncheckedIndexedAccess: this package did not promise the member is there. Narrow it, or add the name here.
Type Parameters ​
Known ​
Known extends string = never