feat(settings): add simple-ping settings (#2118)

This commit is contained in:
Meier Lukas authored and GitHub committed 2025-02-07 22:10:35 +01:00
1 parent c04c42dc8a
commit dff6cb9d31
88 files changed
+4489 -582

No files matched your search

+4
View File
@@ -149,6 +149,10 @@ export type WidgetOptionType = WidgetOptionDefinition["type"];
export type WidgetOptionOfType<TType extends WidgetOptionType> = Extract<WidgetOptionDefinition, { type: TType }>;
type inferOptionFromDefinition<TDefinition extends WidgetOptionDefinition> = TDefinition["defaultValue"];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type inferOptionsFromCreator<TOptions extends (settings: any) => WidgetOptionsRecord> =
inferOptionsFromDefinition<ReturnType<TOptions>>;
export type inferOptionsFromDefinition<TOptions extends WidgetOptionsRecord> = {
[key in keyof TOptions]: inferOptionFromDefinition<TOptions[key]>;
};