@league-of-foundry-developers/foundry-vtt-types 13.346.0-beta.20250923173308 → 13.346.0-beta.20250924210526
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,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
3
3
|
"name": "@league-of-foundry-developers/foundry-vtt-types",
|
4
|
-
"version": "13.346.0-beta.
|
4
|
+
"version": "13.346.0-beta.20250924210526",
|
5
5
|
"description": "TypeScript type definitions for Foundry VTT",
|
6
6
|
"type": "module",
|
7
7
|
"types": "./src/index.d.mts",
|
@@ -2,6 +2,8 @@ import type { fields } from "#common/data/_module.mjs";
|
|
2
2
|
import type { DataSchema } from "#common/data/fields.mjs";
|
3
3
|
import type { GetKey, ValueOf } from "#utils";
|
4
4
|
|
5
|
+
import ClientSettings = foundry.helpers.ClientSettings;
|
6
|
+
|
5
7
|
declare class AVSettings {
|
6
8
|
constructor();
|
7
9
|
|
@@ -66,11 +68,11 @@ declare class AVSettings {
|
|
66
68
|
|
67
69
|
changed(): void;
|
68
70
|
|
69
|
-
get<S extends
|
71
|
+
get<S extends ClientSettings.Scope>(scope: S, setting: string): unknown; // TODO: Improve once we have proper typing for dot notation
|
70
72
|
|
71
73
|
getUser(userId: string): AVSettings.UserSettings | null;
|
72
74
|
|
73
|
-
set<S extends
|
75
|
+
set<S extends ClientSettings.Scope>(scope: S, setting: string, value: unknown): void; // TODO: Improve once we have proper typing for dot notation
|
74
76
|
|
75
77
|
/**
|
76
78
|
* Return a mapping of AV settings for each game User.
|
@@ -372,10 +372,9 @@ declare namespace CompendiumCollection {
|
|
372
372
|
}
|
373
373
|
|
374
374
|
// The type that's passed to `new CompendiumCollection(...)`
|
375
|
-
|
375
|
+
interface ConstructorMetadata<Type extends CompendiumCollection.DocumentName> extends Metadata<Type> {
|
376
376
|
index: IndexTypeForMetadata<Type>;
|
377
|
-
|
378
|
-
};
|
377
|
+
}
|
379
378
|
|
380
379
|
/** The type that appears in `compendium.metadata` after initialization. */
|
381
380
|
// Note that the `Omit` is because `delete metadata.index` and `delete metadata.folder` is called.
|
@@ -814,7 +814,7 @@ declare namespace Game {
|
|
814
814
|
* `for ( const metadata of this.data.packs ) {`.
|
815
815
|
*/
|
816
816
|
// TODO(LukeAbby): Technically a bit underspecified; may be more specific, though unlikely.
|
817
|
-
folders?: Folder.Source;
|
817
|
+
folders?: Folder.Source[];
|
818
818
|
}
|
819
819
|
}
|
820
820
|
|
@@ -261,6 +261,8 @@ declare namespace ClientSettings {
|
|
261
261
|
? Setting.Implementation
|
262
262
|
: SettingInitializedType<N, K>;
|
263
263
|
|
264
|
+
type Scope = "world" | "client" | "user";
|
265
|
+
|
264
266
|
/**
|
265
267
|
* @internal
|
266
268
|
*/
|
@@ -281,7 +283,7 @@ declare namespace ClientSettings {
|
|
281
283
|
* The scope the Setting is stored in, either World or Client
|
282
284
|
* @defaultValue `"client"`
|
283
285
|
*/
|
284
|
-
scope:
|
286
|
+
scope: Scope;
|
285
287
|
|
286
288
|
/** Indicates if this Setting should render in the Config application */
|
287
289
|
config?: boolean | undefined;
|