From 692cf092cee990167409308d21f62108e2eb62fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Sat, 13 May 2023 00:15:54 +0200 Subject: [PATCH] feat: create PropsOf type --- frontend/types/util.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 frontend/types/util.d.ts diff --git a/frontend/types/util.d.ts b/frontend/types/util.d.ts new file mode 100644 index 00000000000..1774c2d6a39 --- /dev/null +++ b/frontend/types/util.d.ts @@ -0,0 +1,12 @@ +import { VNodeProps, AllowedComponentProps } from 'vue'; + +/** + * Extract the type of a component's props in a usable format for defineProps + */ +export type PropsOf }> = Omit< + T['$props'], + | keyof VNodeProps + | keyof AllowedComponentProps + | `$${string}` + | `v-slot${string}` +>;