Skip to content

Commit cc3eb87

Browse files
committed
Types - Improve getVueDataUiConfig type
1 parent 2e7434d commit cc3eb87

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

types/vue-data-ui.d.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7550,12 +7550,15 @@ declare module "vue-data-ui" {
75507550
* ---
75517551
* Get the default config for a given component
75527552
* ___
7553+
* @typeParam T - The config type for the component
7554+
* @param key - Component key in snake_case (e.g. `"vue_ui_xy"`).
7555+
* @returns The default configuration of type `T`.
75537556
* @example
7554-
* const defaultConfig = getVueDataUiConfig("vue_ui_xy");
7555-
*
7556-
* @param key - The key of the component in snake case (e.g., "vue_ui_xy")
7557+
* ```ts
7558+
* const defaultConfig = getVueDataUiConfig<VueUiXyConfig>("vue_ui_xy");
7559+
* ```
75577560
*/
7558-
export const getVueDataUiConfig: (key: VueDataUiConfigKey) => VueDataUiConfig;
7561+
export const getVueDataUiConfig: <T>(key: VueDataUiConfigKey) => T;
75597562

75607563
/**
75617564
* Vue Data UI utility

0 commit comments

Comments
 (0)