-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[typescript] type error in react #18
Comments
+1 here, thinking about moving to kbar |
interface KBarMethods {
open: (opts?: { parent: string }) => void;
close: () => void;
setParent: (parent: string) => void;
}
export interface KBarAction {
id: string;
title: string;
hotkey?: string;
handler?: Function;
mdIcon?: string;
icon?: string;
parent?: string;
keywords?: string;
children?: string[];
section?: string;
}
export interface KBarProps {
hideBreadcrumbs?: boolean,
...
}
type KBar = Pick<HTMLElement, "addEventListener" | "removeEventListener"> &
KBarMethods & KBarProps & { data: KBarAction[] };
declare global {
namespace JSX {
interface IntrinsicElements {
["ninja-keys"]: KBar;
}
}
} |
+1 |
My answer didnt help @williamleiby ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I try to add definitions, but the IDE prompts me for indeed a lot of attributes, including those of HTML elements.
The text was updated successfully, but these errors were encountered: