mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-17 02:31:18 +01:00
✨ Migrate integrations to widgets
This commit is contained in:
10
src/widgets/helper.ts
Normal file
10
src/widgets/helper.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
// Method which allows to define the type verry specific and type checks all
|
||||
|
||||
import { IWidgetDefinition } from './widgets';
|
||||
|
||||
// The options of IWidgetDefinition are so heavily typed that it even used 'true' as type
|
||||
export const defineWidget = <TKey extends string, TOptions extends IWidgetDefinition<TKey>>(
|
||||
options: TOptions
|
||||
) => {
|
||||
return options;
|
||||
};
|
||||
Reference in New Issue
Block a user