Files
nodarium/app/src/lib/settings/index.ts
Max Richter d64877666b
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m47s
fix: 120 type errors
2025-11-24 00:10:38 +01:00

28 lines
673 B
TypeScript

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;
type SettingsNode = InputType | SettingsGroup;
export interface SettingsGroup {
title?: string;
[key: string]: SettingsNode | string | number | undefined;
}
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;
}