@vttforge/types / FoundryNamespace
Interface: FoundryNamespace ​
The foundry global.
Same rule as the rest of this file: every member is one a real consumer reached for, not one that exists in Foundry. Reaching past it is a cast, and a cast is a sentence you write on purpose.
Declare it in your own project and the members below are typed:
import type { FoundryNamespace } from '@vttforge/types';
declare global {
// `var`, not `const`: two blocks naming one global only merge as `var`.
var foundry: FoundryNamespace;
}Properties ​
abstract ​
readonlyabstract:FoundryClassNamespace<"DataModel"|"Document"|"TypeDataModel">
applications ​
readonlyapplications:FoundryApplications
canvas ​
readonlycanvas:FoundryClassNamespace
data ​
readonlydata:object
fields ​
readonlyfields:FoundryClassNamespace<FoundryFieldNames>
Field classes for a schema: StringField, NumberField and the rest.
operators ​
readonlyoperators:FoundryClassNamespace<"ForcedDeletion"|"ForcedReplacement">
For an update that deletes or replaces rather than merging.
dice ​
readonlydice:Readonly<Record<"DiceTerm"|"Die"|"RollTerm",AnyClass>> &Readonly<Record<string,AnyClass|undefined>> &object
Type Declaration ​
Roll ​
readonlyRoll:RollConstructor
documents ​
readonlydocuments:object
collections ​
readonlycollections:FoundryClassNamespace<FoundryCollectionNames>
utils ​
readonlyutils:FoundryUtils
foundry.utils, whole.