@league-of-foundry-developers/foundry-vtt-types 13.346.0-beta.20250808023042 → 13.346.0-beta.20250811213756

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.20250808023042",
4
+ "version": "13.346.0-beta.20250811213756",
5
5
  "description": "TypeScript type definitions for Foundry VTT",
6
6
  "type": "module",
7
7
  "types": "./src/index.d.mts",
@@ -164,14 +164,14 @@
164
164
  "type-fest": "^4.41.0",
165
165
  "typescript": "^5.8.2",
166
166
  "typescript-eslint": "^8.31.0",
167
- "vitest": "^4.0.0-beta.1"
167
+ "vitest": "^4.0.0-beta.7"
168
168
  },
169
169
  "overrides": {
170
170
  "expect-type": "^1.2.2"
171
171
  },
172
172
  "peerDependencies": {
173
- "typescript": "^5.4",
174
- "@typescript/native-preview": "*"
173
+ "@typescript/native-preview": "*",
174
+ "typescript": "^5.4"
175
175
  },
176
176
  "peerDependenciesMeta": {
177
177
  "typescript": {
@@ -1108,10 +1108,24 @@ declare namespace SchemaField {
1108
1108
  * The required type of data used when updating a document.
1109
1109
  * @template Fields - the DataSchema fields of the SchemaField
1110
1110
  */
1111
- // Note(LukeAbby): Currently this is identical to `AssignmentData` but the intent is to make it
1111
+ // Note(LukeAbby): Currently this is too close to `AssignmentData` but the intent is to make it
1112
1112
  // more accurate in the future.
1113
- // eslint-disable-next-line @typescript-eslint/no-deprecated
1114
- type UpdateData<Fields extends DataSchema> = AssignmentData<Fields>;
1113
+ type UpdateData<Fields extends DataSchema> = _AddUpdateKeys<
1114
+ RemoveIndexSignatures<{
1115
+ [Key in keyof Fields]?: Fields[Key][" __fvtt_types_internal_assignment_data"];
1116
+ }>
1117
+ >;
1118
+
1119
+ /** @internal */
1120
+ type _AddUpdateKeys<T> = PrettifyType<
1121
+ T & {
1122
+ [K in keyof T as K extends string ? (T[K] extends undefined ? `-=${K}` : never) : never]?: null;
1123
+ } & {
1124
+ // Note(LukeAbby): There's more work to be done here. For example `type` and `==system` must
1125
+ // go together. This will be added once a performant validator type is created.
1126
+ [K in keyof T as K extends string ? `==${K}` : never]?: T[K];
1127
+ }
1128
+ >;
1115
1129
 
1116
1130
  /**
1117
1131
  * Gets the initialized version of a schema. This means a