@league-of-foundry-developers/foundry-vtt-types 13.346.0-beta.20250709002729 → 13.346.0-beta.20250709002914
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.20250709002914",
|
5
5
|
"description": "TypeScript type definitions for Foundry VTT",
|
6
6
|
"type": "module",
|
7
7
|
"types": "./src/index.d.mts",
|
@@ -1862,10 +1862,12 @@ declare namespace StringField {
|
|
1862
1862
|
SimpleMerge<_OptionsForChoices<Options["choices"]>, MergedOptions<Options>>
|
1863
1863
|
>;
|
1864
1864
|
|
1865
|
+
/** @internal */
|
1865
1866
|
type _OptionsForChoices<Choices extends StringField.Options["choices"]> = undefined extends Choices
|
1866
1867
|
? DefaultOptions
|
1867
1868
|
: DefaultOptionsWhenChoicesProvided;
|
1868
1869
|
|
1870
|
+
/** @internal */
|
1869
1871
|
type _OptionsForInitial<Options extends StringField.Options<unknown>> = Options["initial"] extends undefined
|
1870
1872
|
? SimpleMerge<
|
1871
1873
|
Options,
|
@@ -1890,6 +1892,8 @@ declare namespace StringField {
|
|
1890
1892
|
/** @internal */
|
1891
1893
|
type _ValidChoice<Choices> = Choices extends (...args: infer _1) => infer C ? FixedChoice<C> : FixedChoice<Choices>;
|
1892
1894
|
|
1895
|
+
type _ApplyBlank<Choices, Result> = Choices extends { readonly blank: true } ? Result | "" : Result;
|
1896
|
+
|
1893
1897
|
type FixedChoice<Choices> =
|
1894
1898
|
Choices extends ReadonlyArray<infer U>
|
1895
1899
|
? U
|
@@ -1904,20 +1908,23 @@ declare namespace StringField {
|
|
1904
1908
|
* @deprecated AssignmentData is being phased out. See {@linkcode SchemaField.AssignmentData}
|
1905
1909
|
* for more details.
|
1906
1910
|
*/
|
1907
|
-
|
1908
|
-
|
1909
|
-
|
1910
|
-
_EffectiveOptions<Options
|
1911
|
+
type AssignmentType<Options extends StringField.Options<unknown>> = _ApplyBlank<
|
1912
|
+
Options,
|
1913
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
1914
|
+
DataField.DerivedAssignmentType<ValidChoice<Options>, _EffectiveOptions<Options>>
|
1911
1915
|
>;
|
1912
1916
|
|
1913
1917
|
/**
|
1914
1918
|
* A shorthand for the initialized type of a StringField class.
|
1915
1919
|
* @template Options - the options that override the default options
|
1916
1920
|
*/
|
1917
|
-
type InitializedType<Options extends StringField.Options<unknown>> =
|
1918
|
-
|
1919
|
-
|
1920
|
-
|
1921
|
+
type InitializedType<Options extends StringField.Options<unknown>> = _ApplyBlank<
|
1922
|
+
Options,
|
1923
|
+
DataField.DerivedInitializedType<
|
1924
|
+
// TODO(LukeAbby): This is a workaround for how `ValidChoice` is defined ignorant of the `StringField`/`NumberField` divide.
|
1925
|
+
ValidChoice<Options> & (string | null | undefined),
|
1926
|
+
_EffectiveOptions<Options>
|
1927
|
+
>
|
1921
1928
|
>;
|
1922
1929
|
|
1923
1930
|
type BaseChoices =
|