aboutsummaryrefslogtreecommitdiff
path: root/src/utils/types.ts
diff options
context:
space:
mode:
authorShinigami <[email protected]>2022-05-03 15:48:20 +0200
committerGitHub <[email protected]>2022-05-03 15:48:20 +0200
commita2da7c496e9a3741d165ddfe6128b50837fec361 (patch)
tree88d371bc19487bc8a34d9043035aed8e4fedd7d5 /src/utils/types.ts
parentcc46a0c19af2752b6210c24b715fcce20197b6d9 (diff)
downloadfaker-a2da7c496e9a3741d165ddfe6128b50837fec361.tar.xz
faker-a2da7c496e9a3741d165ddfe6128b50837fec361.zip
refactor!: reorganize src folder (#909)
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<