aboutsummaryrefslogtreecommitdiff
path: root/src/utils/types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/types.ts')
-rw-r--r--src/utils/types.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utils/types.ts b/src/utils/types.ts
index 705d02d1..65c87ebf 100644
--- a/src/utils/types.ts
+++ b/src/utils/types.ts
@@ -1,4 +1,13 @@
/**
+ * Type that provides auto-suggestions but also any string.
+ *
+ * @see https://github.com/microsoft/TypeScript/issues/29729#issuecomment-471566609
+ */
+export type LiteralUnion<T extends U, U = string> =
+ | T
+ | (U & { zz_IGNORE_ME?: never });
+
+/**
* Type that represents a single method/function name of the given type.
*/
export type MethodOf<