fix: 120 type errors
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m47s
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m47s
This commit is contained in:
@@ -2,12 +2,26 @@ import type { NodeInput } from "@nodes/types";
|
||||
|
||||
type Button = { type: "button"; label?: string };
|
||||
|
||||
export type SettingsStore = {
|
||||
[key: string]: SettingsStore | string | number | boolean;
|
||||
};
|
||||
|
||||
type InputType = NodeInput | Button;
|
||||
|
||||
export interface SettingsType {
|
||||
[key: string]: (SettingsType & { title?: string }) | InputType;
|
||||
type SettingsNode = InputType | SettingsGroup;
|
||||
|
||||
export interface SettingsGroup {
|
||||
title?: string;
|
||||
[key: string]: SettingsNode | string | number | undefined;
|
||||
}
|
||||
|
||||
export type SettingsStore = {
|
||||
[key: string]: SettingsStore | string | number | boolean
|
||||
};
|
||||
export type SettingsType = Record<string, SettingsNode>;
|
||||
|
||||
export type SettingsValue = Record<
|
||||
string,
|
||||
Record<string, unknown> | string | number | boolean | number[]
|
||||
>;
|
||||
|
||||
export function isNodeInput(v: SettingsNode | undefined): v is InputType {
|
||||
return !!v && "type" in v;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user