foundry-vtt-types
foundry-vtt-types copied to clipboard
Unofficial type declarations for the Foundry Virtual Tabletop API
Sub-properties on `CONFIG` aren't very configurable because of limitations in declaration merging. Refactor out all sub-properties that should be configurable into interfaces but keep around the defaults in case there's...
This probably isn't very compatible with Yarn v2's system.
[SWADE commit](https://gitlab.com/peginc/swade) `6ad833b517d796554e2101413081a0a92c2f4825` in `CommonActorData` This appears to be resolvable by typing `this: TheDataModel` for instance methods, but A. Can't help getters and B. raises question of why this is...
The `Folders`, `FogExploration`, and `Users` collections erroneously include `SidebarTab` as an option in their results. Furthermore, it's unclear if the inclusion of `null` is correct.
The `choices` parameter in NumberFieldOptions should constrain the resulting type, but it does not currently. Options for implementation 1. Replicate the handling from StringField (easier solution) 2. Find a way...
- [ ] The `darkness` field in `foundry.documents.BaseAmbientSound` is a SchemaField that is not required and can be safely initialized from a value of an explicit `undefined` or `null`, but...
With the successful implementation of data models, the old system of configuring flags appears to be broken. In general, the CONFIG file needs some love and attention and can be...
**In which branch or foundry version does the problem occur?** main **Describe the wrong type** The types for `register` are currently not correct. The connection between the `type` property and...
Hello, I don't know if typescript allow it but could it be possible to automatically types items of `actor.itemTypes`: When I'm accessing to types like: ```ts let weapons = itemsByType['weapon'];...
This test suite from `tests/types/utils.test-d.ts` should all work, but it doesn't because the guarantee is stripped. ```ts declare const storedUser: StoredDocument; expectTypeOf(storedUser.id).toEqualTypeOf(); expectTypeOf(storedUser._id).toEqualTypeOf(); expectTypeOf(storedUser._source._id).toEqualTypeOf(); expectTypeOf(storedUser.toJSON()._id).toEqualTypeOf(); expectTypeOf(storedUser.toJSON()._id).toEqualTypeOf(); expectTypeOf(storedUser.toObject()._id).toEqualTypeOf(); expectTypeOf(storedUser.toObject()._id).toEqualTypeOf(); expectTypeOf(storedUser.toObject(false)._id).toEqualTypeOf(); expectTypeOf(storedUser.toObject(false)._id).toEqualTypeOf();...