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

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.20250811213756",
4
+ "version": "13.346.0-beta.20250811234631",
5
5
  "description": "TypeScript type definitions for Foundry VTT",
6
6
  "type": "module",
7
7
  "types": "./src/index.d.mts",
@@ -1,13 +1,5 @@
1
1
  import type { DataModel } from "../abstract/data.d.mts";
2
- import type {
3
- AnyMutableObject,
4
- EmptyObject,
5
- GetKey,
6
- NullishCoalesce,
7
- RemoveIndexSignatures,
8
- ToMethod,
9
- ValueOf,
10
- } from "#utils";
2
+ import type { AnyMutableObject, GetKey, NullishCoalesce, RemoveIndexSignatures, ToMethod, ValueOf } from "#utils";
11
3
  import type { SchemaField } from "./fields.d.mts";
12
4
 
13
5
  import fields = foundry.data.fields;
@@ -612,8 +604,9 @@ declare namespace TextureData {
612
604
  * A {@linkcode fields.SchemaField} subclass used to represent texture data.
613
605
  */
614
606
  declare class TextureData<
615
- SrcOptions extends TextureData.SrcOptions = TextureData.DefaultOptions,
616
- SchemaOptions extends fields.SchemaField.Options<TextureData.Schema<SrcOptions>> = EmptyObject,
607
+ const SrcOptions extends TextureData.SrcOptions = TextureData.DefaultOptions,
608
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
609
+ const SchemaOptions extends fields.SchemaField.Options<TextureData.Schema<SrcOptions>> = {},
617
610
  > extends fields.SchemaField<TextureData.Schema<SrcOptions>, SchemaOptions> {
618
611
  /**
619
612
  * @param options - Options which are forwarded to the SchemaField constructor
@@ -540,14 +540,11 @@ declare namespace DataField {
540
540
  * @deprecated AssignmentType is being deprecated. See {@linkcode SchemaField.AssignmentData}
541
541
  * for more details.
542
542
  */
543
- type AssignmentTypeFor<ConcreteDataField extends Any> =
544
- ConcreteDataField extends DataField<any, infer AssignmentType, any, any> ? AssignmentType : never;
543
+ type AssignmentTypeFor<ConcreteDataField extends Any> = ConcreteDataField[" __fvtt_types_internal_assignment_data"];
545
544
 
546
- type InitializedTypeFor<ConcreteDataField extends Any> =
547
- ConcreteDataField extends DataField<any, any, infer InitializedType, any> ? InitializedType : never;
545
+ type InitializedTypeFor<ConcreteDataField extends Any> = ConcreteDataField[" __fvtt_types_internal_initialized_data"];
548
546
 
549
- type PersistedTypeFor<ConcreteDataField extends Any> =
550
- ConcreteDataField extends DataField<any, any, any, infer PersistedType> ? PersistedType : never;
547
+ type PersistedTypeFor<ConcreteDataField extends Any> = ConcreteDataField[" __fvtt_types_internal_source_data"];
551
548
 
552
549
  /** The type of the default options for the {@linkcode DataField} class. */
553
550
  interface DefaultOptions {
@@ -894,15 +891,12 @@ declare abstract class AnyDataField extends DataField<any, any, any, any> {
894
891
  * - PersistedType: `SchemaField.PersistedType<Fields>`
895
892
  */
896
893
  declare class SchemaField<
897
- Fields extends DataSchema,
898
- Options extends SchemaField.Options<Fields> = SchemaField.DefaultOptions,
894
+ const Fields extends DataSchema,
895
+ const Options extends SchemaField.Options<Fields> = SchemaField.DefaultOptions,
899
896
  // eslint-disable-next-line @typescript-eslint/no-deprecated
900
- AssignmentType = SchemaField.Internal.AssignmentType<Fields, SimpleMerge<Options, SchemaField.DefaultOptions>>,
901
- InitializedType = SchemaField.Internal.InitializedType<Fields, SimpleMerge<Options, SchemaField.DefaultOptions>>,
902
- PersistedType extends AnyObject | null | undefined = SchemaField.Internal.PersistedType<
903
- Fields,
904
- SimpleMerge<Options, SchemaField.DefaultOptions>
905
- >,
897
+ const AssignmentType = SchemaField.Internal.AssignmentType<Fields, Options>,
898
+ const InitializedType = SchemaField.Internal.InitializedType<Fields, Options>,
899
+ const PersistedType extends AnyObject | null | undefined = SchemaField.Internal.PersistedType<Fields, Options>,
906
900
  >
907
901
  extends DataField<Options, AssignmentType, InitializedType, PersistedType>
908
902
  implements DataField.Internal.NestedFieldImplementation
@@ -1100,7 +1094,8 @@ declare namespace SchemaField {
1100
1094
  */
1101
1095
  type AssignmentData<Fields extends DataSchema> = PrettifyType<
1102
1096
  RemoveIndexSignatures<{
1103
- [Key in keyof Fields]?: Fields[Key][" __fvtt_types_internal_assignment_data"];
1097
+ // Note(LukeAbby): Simply stripping off `readonly` may eventually need to be revisited.
1098
+ -readonly [Key in keyof Fields]?: Fields[Key][" __fvtt_types_internal_assignment_data"];
1104
1099
  }>
1105
1100
  >;
1106
1101
 
@@ -1112,7 +1107,7 @@ declare namespace SchemaField {
1112
1107
  // more accurate in the future.
1113
1108
  type UpdateData<Fields extends DataSchema> = _AddUpdateKeys<
1114
1109
  RemoveIndexSignatures<{
1115
- [Key in keyof Fields]?: Fields[Key][" __fvtt_types_internal_assignment_data"];
1110
+ -readonly [Key in keyof Fields]?: Fields[Key][" __fvtt_types_internal_assignment_data"];
1116
1111
  }>
1117
1112
  >;
1118
1113
 
@@ -1133,7 +1128,7 @@ declare namespace SchemaField {
1133
1128
  */
1134
1129
  type InitializedData<Fields extends DataSchema> = PrettifyType<
1135
1130
  RemoveIndexSignatures<{
1136
- [Key in keyof Fields]: Fields[Key][" __fvtt_types_internal_initialized_data"];
1131
+ -readonly [Key in keyof Fields]: Fields[Key][" __fvtt_types_internal_initialized_data"];
1137
1132
  }>
1138
1133
  >;
1139
1134
 
@@ -1143,13 +1138,13 @@ declare namespace SchemaField {
1143
1138
  */
1144
1139
  type SourceData<Fields extends DataSchema> = PrettifyType<
1145
1140
  RemoveIndexSignatures<{
1146
- [Key in keyof Fields]: Fields[Key][" __fvtt_types_internal_source_data"];
1141
+ -readonly [Key in keyof Fields]: Fields[Key][" __fvtt_types_internal_source_data"];
1147
1142
  }>
1148
1143
  >;
1149
1144
 
1150
1145
  type UpdateSourceData<Fields extends DataSchema> = PrettifyType<
1151
1146
  RemoveIndexSignatures<{
1152
- [Key in keyof Fields]: Fields[Key][" __fvtt_types_internal_initialized_data"];
1147
+ -readonly [Key in keyof Fields]: Fields[Key][" __fvtt_types_internal_initialized_data"];
1153
1148
  }>
1154
1149
  >;
1155
1150
 
@@ -2573,16 +2568,16 @@ declare namespace ArrayField {
2573
2568
  * - InitialValue: `new Set()`
2574
2569
  */
2575
2570
  declare class SetField<
2576
- ElementFieldType extends DataField.Any,
2577
- Options extends SetField.AnyOptions = SetField.DefaultOptions,
2571
+ const ElementFieldType extends DataField.Any,
2572
+ const Options extends SetField.AnyOptions = SetField.DefaultOptions,
2578
2573
  // eslint-disable-next-line @typescript-eslint/no-deprecated
2579
- AssignmentElementType = ArrayField.AssignmentElementType<ElementFieldType>,
2580
- InitializedElementType = ArrayField.InitializedElementType<ElementFieldType>,
2574
+ const AssignmentElementType = ArrayField.AssignmentElementType<ElementFieldType>,
2575
+ const InitializedElementType = ArrayField.InitializedElementType<ElementFieldType>,
2581
2576
  // eslint-disable-next-line @typescript-eslint/no-deprecated
2582
- AssignmentType = SetField.AssignmentType<AssignmentElementType, Options>,
2583
- InitializedType = SetField.InitializedType<InitializedElementType, Options>,
2584
- PersistedElementType = ArrayField.PersistedElementType<ElementFieldType>,
2585
- PersistedType extends PersistedElementType[] | null | undefined = SetField.PersistedType<
2577
+ const AssignmentType = SetField.AssignmentType<AssignmentElementType, Options>,
2578
+ const InitializedType = SetField.InitializedType<InitializedElementType, Options>,
2579
+ const PersistedElementType = ArrayField.PersistedElementType<ElementFieldType>,
2580
+ const PersistedType extends PersistedElementType[] | null | undefined = SetField.PersistedType<
2586
2581
  PersistedElementType,
2587
2582
  Options
2588
2583
  >,
@@ -2858,24 +2853,24 @@ declare namespace EmbeddedDataField {
2858
2853
  * - InitialValue: `[]`
2859
2854
  */
2860
2855
  declare class EmbeddedCollectionField<
2861
- ElementFieldType extends Document.AnyConstructor,
2856
+ const ElementFieldType extends Document.AnyConstructor,
2862
2857
  // TODO(LukeAbby): See if `ParentDataModel` can be made redundant by automatically inferring.
2863
- ParentDataModel extends Document.Any,
2864
- Options extends EmbeddedCollectionField.Options<any> = EmbeddedCollectionField.DefaultOptions,
2858
+ const ParentDataModel extends Document.Any,
2859
+ const Options extends EmbeddedCollectionField.Options<any> = EmbeddedCollectionField.DefaultOptions,
2865
2860
  // eslint-disable-next-line @typescript-eslint/no-deprecated
2866
- AssignmentElementType = EmbeddedCollectionField.AssignmentElementType<ElementFieldType>,
2867
- InitializedElementType extends
2861
+ const AssignmentElementType = EmbeddedCollectionField.AssignmentElementType<ElementFieldType>,
2862
+ const InitializedElementType extends
2868
2863
  Document.Internal.Instance.Any = EmbeddedCollectionField.InitializedElementType<ElementFieldType>,
2869
2864
  // eslint-disable-next-line @typescript-eslint/no-deprecated
2870
- AssignmentType = EmbeddedCollectionField.AssignmentType<AssignmentElementType, Options>,
2871
- InitializedType = EmbeddedCollectionField.InitializedType<
2865
+ const AssignmentType = EmbeddedCollectionField.AssignmentType<AssignmentElementType, Options>,
2866
+ const InitializedType = EmbeddedCollectionField.InitializedType<
2872
2867
  AssignmentElementType,
2873
2868
  InitializedElementType,
2874
2869
  ParentDataModel,
2875
2870
  Options
2876
2871
  >,
2877
- PersistedElementType = EmbeddedCollectionField.PersistedElementType<ElementFieldType>,
2878
- PersistedType extends PersistedElementType[] | null | undefined = EmbeddedCollectionField.PersistedType<
2872
+ const PersistedElementType = EmbeddedCollectionField.PersistedElementType<ElementFieldType>,
2873
+ const PersistedType extends PersistedElementType[] | null | undefined = EmbeddedCollectionField.PersistedType<
2879
2874
  AssignmentElementType,
2880
2875
  PersistedElementType,
2881
2876
  Options
@@ -3109,23 +3104,23 @@ declare namespace EmbeddedCollectionField {
3109
3104
  * - InitialValue: `[]`
3110
3105
  */
3111
3106
  declare class EmbeddedCollectionDeltaField<
3112
- ElementFieldType extends Document.AnyConstructor,
3113
- ParentDataModel extends Document.Any,
3114
- Options extends EmbeddedCollectionDeltaField.Options<any> = EmbeddedCollectionDeltaField.DefaultOptions,
3107
+ const ElementFieldType extends Document.AnyConstructor,
3108
+ const ParentDataModel extends Document.Any,
3109
+ const Options extends EmbeddedCollectionDeltaField.Options<any> = EmbeddedCollectionDeltaField.DefaultOptions,
3115
3110
  // eslint-disable-next-line @typescript-eslint/no-deprecated
3116
- AssignmentElementType = EmbeddedCollectionDeltaField.AssignmentElementType<ElementFieldType>,
3117
- InitializedElementType extends
3111
+ const AssignmentElementType = EmbeddedCollectionDeltaField.AssignmentElementType<ElementFieldType>,
3112
+ const InitializedElementType extends
3118
3113
  Document.Internal.Instance.Any = EmbeddedCollectionDeltaField.InitializedElementType<ElementFieldType>,
3119
3114
  // eslint-disable-next-line @typescript-eslint/no-deprecated
3120
- AssignmentType = EmbeddedCollectionDeltaField.AssignmentType<AssignmentElementType, Options>,
3121
- InitializedType = EmbeddedCollectionDeltaField.InitializedType<
3115
+ const AssignmentType = EmbeddedCollectionDeltaField.AssignmentType<AssignmentElementType, Options>,
3116
+ const InitializedType = EmbeddedCollectionDeltaField.InitializedType<
3122
3117
  AssignmentElementType,
3123
3118
  InitializedElementType,
3124
3119
  ParentDataModel,
3125
3120
  Options
3126
3121
  >,
3127
- PersistedElementType = EmbeddedCollectionDeltaField.PersistedElementType<ElementFieldType>,
3128
- PersistedType extends PersistedElementType[] | null | undefined = EmbeddedCollectionDeltaField.PersistedType<
3122
+ const PersistedElementType = EmbeddedCollectionDeltaField.PersistedElementType<ElementFieldType>,
3123
+ const PersistedType extends PersistedElementType[] | null | undefined = EmbeddedCollectionDeltaField.PersistedType<
3129
3124
  AssignmentElementType,
3130
3125
  PersistedElementType,
3131
3126
  Options
@@ -3394,11 +3389,11 @@ declare namespace EmbeddedDocumentField {
3394
3389
  * - InitialValue: `null`
3395
3390
  */
3396
3391
  declare class DocumentIdField<
3397
- Options extends DocumentIdField.Options = DocumentIdField.DefaultOptions,
3392
+ const Options extends DocumentIdField.Options = DocumentIdField.DefaultOptions,
3398
3393
  // eslint-disable-next-line @typescript-eslint/no-deprecated
3399
- AssignmentType = DocumentIdField.AssignmentType<Options>,
3400
- InitializedType = DocumentIdField.InitializedType<Options>,
3401
- PersistedType extends string | null | undefined = DocumentIdField.InitializedType<Options>,
3394
+ const AssignmentType = DocumentIdField.AssignmentType<Options>,
3395
+ const InitializedType = DocumentIdField.InitializedType<Options>,
3396
+ const PersistedType extends string | null | undefined = DocumentIdField.InitializedType<Options>,
3402
3397
  > extends StringField<Options, AssignmentType, InitializedType, PersistedType> {
3403
3398
  /** @defaultValue `true` */
3404
3399
  override required: boolean;
@@ -3587,12 +3582,12 @@ declare namespace DocumentUUIDField {
3587
3582
  * - InitialValue: `null`
3588
3583
  */
3589
3584
  declare class ForeignDocumentField<
3590
- DocumentType extends Document.AnyConstructor,
3591
- Options extends ForeignDocumentField.Options = ForeignDocumentField.DefaultOptions,
3585
+ const DocumentType extends Document.AnyConstructor,
3586
+ const Options extends ForeignDocumentField.Options = ForeignDocumentField.DefaultOptions,
3592
3587
  // eslint-disable-next-line @typescript-eslint/no-deprecated
3593
- AssignmentType = ForeignDocumentField.AssignmentType<DocumentType, Options>,
3594
- InitializedType = ForeignDocumentField.InitializedType<DocumentType, Options>,
3595
- PersistedType extends string | null | undefined = ForeignDocumentField.PersistedType<Options>,
3588
+ const AssignmentType = ForeignDocumentField.AssignmentType<DocumentType, Options>,
3589
+ const InitializedType = ForeignDocumentField.InitializedType<DocumentType, Options>,
3590
+ const PersistedType extends string | null | undefined = ForeignDocumentField.PersistedType<Options>,
3596
3591
  > extends DocumentIdField<Options, AssignmentType, InitializedType, PersistedType> {
3597
3592
  /**
3598
3593
  * @param model - The foreign DataModel class definition which this field should link to.
@@ -3706,11 +3701,11 @@ declare namespace ForeignDocumentField {
3706
3701
  * - InitialValue: `null`
3707
3702
  */
3708
3703
  declare class ColorField<
3709
- Options extends StringField.Options = ColorField.DefaultOptions,
3704
+ const Options extends StringField.Options = ColorField.DefaultOptions,
3710
3705
  // eslint-disable-next-line @typescript-eslint/no-deprecated
3711
- AssignmentType = ColorField.AssignmentType<Options>,
3712
- InitializedType = ColorField.InitializedType<Options>,
3713
- PersistedType extends string | null | undefined = ColorField.PersistedType<Options>,
3706
+ const AssignmentType = ColorField.AssignmentType<Options>,
3707
+ const InitializedType = ColorField.InitializedType<Options>,
3708
+ const PersistedType extends string | null | undefined = ColorField.PersistedType<Options>,
3714
3709
  > extends StringField<Options, AssignmentType, InitializedType, PersistedType> {
3715
3710
  /** @defaultValue `true` */
3716
3711
  override nullable: boolean;
@@ -3812,11 +3807,11 @@ declare namespace ColorField {
3812
3807
  * - InitialValue: `null`
3813
3808
  */
3814
3809
  declare class FilePathField<
3815
- Options extends FilePathField.Options = FilePathField.DefaultOptions,
3810
+ const Options extends FilePathField.Options = FilePathField.DefaultOptions,
3816
3811
  // eslint-disable-next-line @typescript-eslint/no-deprecated
3817
- AssignmentType = FilePathField.AssignmentType<Options>,
3818
- InitializedType = FilePathField.InitializedType<Options>,
3819
- PersistedType extends string | null | undefined = FilePathField.InitializedType<Options>,
3812
+ const AssignmentType = FilePathField.AssignmentType<Options>,
3813
+ const InitializedType = FilePathField.InitializedType<Options>,
3814
+ const PersistedType extends string | null | undefined = FilePathField.InitializedType<Options>,
3820
3815
  > extends StringField<Options, AssignmentType, InitializedType, PersistedType> {
3821
3816
  /**
3822
3817
  * @param options - Options which configure the behavior of the field
@@ -3946,11 +3941,11 @@ declare namespace FilePathField {
3946
3941
  * - InitialValue: `0`
3947
3942
  */
3948
3943
  declare class AngleField<
3949
- Options extends AngleField.Options = AngleField.DefaultOptions,
3944
+ const Options extends AngleField.Options = AngleField.DefaultOptions,
3950
3945
  // eslint-disable-next-line @typescript-eslint/no-deprecated
3951
- AssignmentType = AngleField.AssignmentType<Options>,
3952
- InitializedType = AngleField.InitializedType<Options>,
3953
- PersistedType extends number | null | undefined = AngleField.InitializedType<Options>,
3946
+ const AssignmentType = AngleField.AssignmentType<Options>,
3947
+ const InitializedType = AngleField.InitializedType<Options>,
3948
+ const PersistedType extends number | null | undefined = AngleField.InitializedType<Options>,
3954
3949
  > extends NumberField<Options, AssignmentType, InitializedType, PersistedType> {
3955
3950
  /**
3956
3951
  * @param options - Options which configure the behavior of the field
@@ -4060,11 +4055,11 @@ declare namespace AngleField {
4060
4055
  * - InitialValue: `1`
4061
4056
  */
4062
4057
  declare class AlphaField<
4063
- Options extends NumberField.Options = AlphaField.DefaultOptions,
4058
+ const Options extends NumberField.Options = AlphaField.DefaultOptions,
4064
4059
  // eslint-disable-next-line @typescript-eslint/no-deprecated
4065
- AssignmentType = AlphaField.AssignmentType<Options>,
4066
- InitializedType = AlphaField.InitializedType<Options>,
4067
- PersistedType extends number | null | undefined = AlphaField.InitializedType<Options>,
4060
+ const AssignmentType = AlphaField.AssignmentType<Options>,
4061
+ const InitializedType = AlphaField.InitializedType<Options>,
4062
+ const PersistedType extends number | null | undefined = AlphaField.InitializedType<Options>,
4068
4063
  > extends NumberField<Options, AssignmentType, InitializedType, PersistedType> {
4069
4064
  /** @defaultValue `true` */
4070
4065
  override required: boolean;
@@ -4169,12 +4164,12 @@ declare namespace HueField {
4169
4164
  * This can only be changed later by GM users.
4170
4165
  */
4171
4166
  declare class DocumentAuthorField<
4172
- DocumentType extends Document.AnyConstructor,
4173
- Options extends DocumentAuthorField.Options = DocumentAuthorField.DefaultOptions,
4167
+ const DocumentType extends Document.AnyConstructor,
4168
+ const Options extends DocumentAuthorField.Options = DocumentAuthorField.DefaultOptions,
4174
4169
  // eslint-disable-next-line @typescript-eslint/no-deprecated
4175
- AssignmentType = ForeignDocumentField.AssignmentType<DocumentType, Options>,
4176
- InitializedType = ForeignDocumentField.InitializedType<DocumentType, Options>,
4177
- PersistedType extends string | null | undefined = ForeignDocumentField.PersistedType<Options>,
4170
+ const AssignmentType = ForeignDocumentField.AssignmentType<DocumentType, Options>,
4171
+ const InitializedType = ForeignDocumentField.InitializedType<DocumentType, Options>,
4172
+ const PersistedType extends string | null | undefined = ForeignDocumentField.PersistedType<Options>,
4178
4173
  > extends ForeignDocumentField<DocumentType, Options, AssignmentType, InitializedType, PersistedType> {
4179
4174
  /** @defaultValue `true` */
4180
4175
  override nullable: boolean;
@@ -4216,11 +4211,11 @@ declare namespace DocumentAuthorField {
4216
4211
  * - InitialValue: `{ default: DOCUMENT_OWNERSHIP_LEVELS.NONE }`
4217
4212
  */
4218
4213
  declare class DocumentOwnershipField<
4219
- Options extends DocumentOwnershipField.Options = DocumentOwnershipField.DefaultOptions,
4214
+ const Options extends DocumentOwnershipField.Options = DocumentOwnershipField.DefaultOptions,
4220
4215
  // eslint-disable-next-line @typescript-eslint/no-deprecated
4221
- AssignmentType = DocumentOwnershipField.AssignmentType<Options>,
4222
- InitializedType = DocumentOwnershipField.InitializedType<Options>,
4223
- PersistedType extends
4216
+ const AssignmentType = DocumentOwnershipField.AssignmentType<Options>,
4217
+ const InitializedType = DocumentOwnershipField.InitializedType<Options>,
4218
+ const PersistedType extends
4224
4219
  | Record<string, DOCUMENT_OWNERSHIP_LEVELS>
4225
4220
  | null
4226
4221
  | undefined = DocumentOwnershipField.InitializedType<Options>,
@@ -4301,11 +4296,11 @@ declare namespace DocumentOwnershipField {
4301
4296
  */
4302
4297
  declare class JSONField<
4303
4298
  // TODO(LukeAbby): Due to the unconditional setting of `blank`, `trim`, and `choices` setting them is meaningless which basically means they're removed from the options.
4304
- Options extends StringField.Options = JSONField.DefaultOptions,
4299
+ const Options extends StringField.Options = JSONField.DefaultOptions,
4305
4300
  // eslint-disable-next-line @typescript-eslint/no-deprecated
4306
- AssignmentType = JSONField.AssignmentType<Options>,
4307
- InitializedType = JSONField.InitializedType<Options>,
4308
- PersistedType extends string | null | undefined = JSONField.PersistedType<Options>,
4301
+ const AssignmentType = JSONField.AssignmentType<Options>,
4302
+ const InitializedType = JSONField.InitializedType<Options>,
4303
+ const PersistedType extends string | null | undefined = JSONField.PersistedType<Options>,
4309
4304
  > extends StringField<Options, AssignmentType, InitializedType, PersistedType> {
4310
4305
  // options: not null (unchecked `in` operation in super), context: not null (destructured in super)
4311
4306
  constructor(options?: Options, context?: DataField.ConstructionContext);
@@ -4458,11 +4453,11 @@ declare class AnyField extends DataField<DataField.Options.Any, unknown, unknown
4458
4453
  * - InitialValue: `""`
4459
4454
  */
4460
4455
  declare class HTMLField<
4461
- Options extends StringField.Options = HTMLField.DefaultOptions,
4456
+ const Options extends StringField.Options = HTMLField.DefaultOptions,
4462
4457
  // eslint-disable-next-line @typescript-eslint/no-deprecated
4463
- AssignmentType = HTMLField.AssignmentType<Options>,
4464
- InitializedType = HTMLField.InitializedType<Options>,
4465
- PersistedType extends string | null | undefined = HTMLField.InitializedType<Options>,
4458
+ const AssignmentType = HTMLField.AssignmentType<Options>,
4459
+ const InitializedType = HTMLField.InitializedType<Options>,
4460
+ const PersistedType extends string | null | undefined = HTMLField.InitializedType<Options>,
4466
4461
  > extends StringField<Options, AssignmentType, InitializedType, PersistedType> {
4467
4462
  /** @defaultValue `true` */
4468
4463
  override required: boolean;
@@ -4552,11 +4547,11 @@ declare namespace HTMLField {
4552
4547
  * - InitialValue: `0`
4553
4548
  */
4554
4549
  declare class IntegerSortField<
4555
- Options extends NumberField.Options = IntegerSortField.DefaultOptions,
4550
+ const Options extends NumberField.Options = IntegerSortField.DefaultOptions,
4556
4551
  // eslint-disable-next-line @typescript-eslint/no-deprecated
4557
- AssignmentType = IntegerSortField.AssignmentType<Options>,
4558
- InitializedType = IntegerSortField.InitializedType<Options>,
4559
- PersistedType extends number | null | undefined = IntegerSortField.InitializedType<Options>,
4552
+ const AssignmentType = IntegerSortField.AssignmentType<Options>,
4553
+ const InitializedType = IntegerSortField.InitializedType<Options>,
4554
+ const PersistedType extends number | null | undefined = IntegerSortField.InitializedType<Options>,
4560
4555
  > extends NumberField<Options, AssignmentType, InitializedType, PersistedType> {
4561
4556
  /** @defaultValue `true` */
4562
4557
  override required: boolean;
@@ -4618,10 +4613,10 @@ declare namespace IntegerSortField {
4618
4613
  * A subclass of {@linkcode TypedObjectField} that is used specifically for the Document "flags" field.
4619
4614
  */
4620
4615
  declare class DocumentFlagsField<
4621
- Name extends Document.Type,
4616
+ const Name extends Document.Type,
4622
4617
  // The type `{}` is useful here because in an intersection it reduces down to nothing unlike `EmptyObject`.
4623
4618
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
4624
- ExtensionFlags extends AnyObject = {},
4619
+ const ExtensionFlags extends AnyObject = {},
4625
4620
  const Options extends DocumentFlagsField.Options = DocumentFlagsField.DefaultOptions,
4626
4621
  > extends TypedObjectField<
4627
4622
  ObjectField,
@@ -4723,11 +4718,11 @@ declare namespace DocumentFlagsField {
4723
4718
  */
4724
4719
  // TODO: exclude everything in DocumentStatsField.managedFields from AssignmentType
4725
4720
  declare class DocumentStatsField<
4726
- Options extends DocumentStatsField.Options = DocumentStatsField.DefaultOptions,
4721
+ const Options extends DocumentStatsField.Options = DocumentStatsField.DefaultOptions,
4727
4722
  // eslint-disable-next-line @typescript-eslint/no-deprecated
4728
- AssignmentType = DocumentStatsField.AssignmentType<Options>,
4729
- InitializedType = DocumentStatsField.InitializedType<Options>,
4730
- PersistedType extends AnyObject | null | undefined = DocumentStatsField.PersistedType<Options>,
4723
+ const AssignmentType = DocumentStatsField.AssignmentType<Options>,
4724
+ const InitializedType = DocumentStatsField.InitializedType<Options>,
4725
+ const PersistedType extends AnyObject | null | undefined = DocumentStatsField.PersistedType<Options>,
4731
4726
  > extends SchemaField<DocumentStatsField.Schema, Options, AssignmentType, InitializedType, PersistedType> {
4732
4727
  /**
4733
4728
  * @param options - Options which configure the behavior of the field