@league-of-foundry-developers/foundry-vtt-types 9.249.2 → 9.249.3
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.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@league-of-foundry-developers/foundry-vtt-types",
|
3
|
-
"version": "9.249.
|
3
|
+
"version": "9.249.3",
|
4
4
|
"description": "TypeScript type definitions for Foundry VTT",
|
5
5
|
"exports": {
|
6
6
|
".": {
|
@@ -73,7 +73,7 @@
|
|
73
73
|
"husky": "^7.0.4",
|
74
74
|
"lint-staged": "^12.1.2",
|
75
75
|
"prettier": "^2.5.1",
|
76
|
-
"tsd": "
|
76
|
+
"tsd": "^0.19.1",
|
77
77
|
"typescript": "~4.5.3"
|
78
78
|
},
|
79
79
|
"husky": {
|
@@ -283,14 +283,14 @@ declare abstract class DocumentData<
|
|
283
283
|
toObject(source: false): {
|
284
284
|
[Key in keyof ConcreteDocumentSchema as string extends Key ? never : Key]: Key extends keyof this
|
285
285
|
? ToObjectFalseType<this[Key]>
|
286
|
-
:
|
286
|
+
: unknown;
|
287
287
|
};
|
288
288
|
|
289
289
|
/**
|
290
290
|
* Extract the source data for the DocumentData into a simple object format that can be serialized.
|
291
291
|
* @returns The document source data expressed as a plain object
|
292
292
|
*/
|
293
|
-
toJSON(): this['_id'] extends string ?
|
293
|
+
toJSON(): this['_id'] extends string ? this['_source'] & { _id: string } : this['_source'];
|
294
294
|
|
295
295
|
/**
|
296
296
|
* Create a DocumentData instance using a provided serialized JSON string.
|
@@ -673,7 +673,11 @@ declare abstract class Document<
|
|
673
673
|
* @param source - Draw values from the underlying data source rather than transformed values
|
674
674
|
* @returns The extracted primitive object
|
675
675
|
*/
|
676
|
-
toObject(
|
676
|
+
toObject(
|
677
|
+
source?: true
|
678
|
+
): this['id'] extends string
|
679
|
+
? ReturnType<this['data']['toJSON']> & { _id: string }
|
680
|
+
: ReturnType<this['data']['toJSON']>;
|
677
681
|
toObject(
|
678
682
|
source: false
|
679
683
|
): this['id'] extends string
|
@@ -686,8 +690,8 @@ declare abstract class Document<
|
|
686
690
|
* @returns The document data expressed as a plain object
|
687
691
|
*/
|
688
692
|
toJSON(): this['id'] extends string
|
689
|
-
? ReturnType<
|
690
|
-
: ReturnType<
|
693
|
+
? ReturnType<this['data']['toJSON']> & { _id: string }
|
694
|
+
: ReturnType<this['data']['toJSON']>;
|
691
695
|
|
692
696
|
/**
|
693
697
|
* For Documents which include game system data, migrate the system data object to conform to its latest data model.
|
@@ -211,7 +211,7 @@ declare namespace ClientSettings {
|
|
211
211
|
label?: string;
|
212
212
|
name?: string;
|
213
213
|
restricted: boolean;
|
214
|
-
type: ConstructorOf<FormApplication<FormApplicationOptions, object>>;
|
214
|
+
type: ConstructorOf<FormApplication<FormApplicationOptions, object, undefined>>;
|
215
215
|
}
|
216
216
|
|
217
217
|
interface RegisteredMenuSettings {
|