summaryrefslogtreecommitdiff
path: root/op_crates/web/internal.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'op_crates/web/internal.d.ts')
-rw-r--r--op_crates/web/internal.d.ts19
1 files changed, 17 insertions, 2 deletions
diff --git a/op_crates/web/internal.d.ts b/op_crates/web/internal.d.ts
index 6f6849a7e..04fc061bb 100644
--- a/op_crates/web/internal.d.ts
+++ b/op_crates/web/internal.d.ts
@@ -209,13 +209,28 @@ declare namespace globalThis {
required?: boolean;
}
- /**ie
- * Assert that the a function has at least a required amount of arguments.
+ /**
+ * Create a converter for dictionaries.
*/
declare function createDictionaryConverter<T>(
name: string,
...dictionaries: Dictionary[]
): (v: any, opts: ValueConverterOpts) => T;
+
+ /**
+ * Create a converter for enums.
+ */
+ declare function createEnumConverter(
+ name: string,
+ values: string[],
+ ): (v: any, opts: ValueConverterOpts) => string;
+
+ /**
+ * Create a converter that makes the contained type nullable.
+ */
+ declare function createNullableConverter<T>(
+ converter: (v: any, opts: ValueConverterOpts) => T,
+ ): (v: any, opts: ValueConverterOpts) => T | null;
}
declare var url: {