Skip to content

Commit 55724a1

Browse files
committed
fix: update typescript types
1 parent 728d042 commit 55724a1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

index.d.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ declare module 'react-simple-code-editor' {
88
> & {
99
// Props for the component
1010
value: string;
11-
onValueChange: (value: string) => unknown;
11+
onValueChange: (value: string) => void;
1212
highlight: (value: string) => string | React.ReactNode;
1313
tabSize?: number;
1414
insertSpaces?: boolean;
1515
ignoreTabKey?: boolean;
1616
padding?: number | string;
17-
style?: object;
17+
style?: React.CSSProperties;
1818

1919
// Props for the textarea
20+
textareaId?: string,
2021
autoFocus?: boolean;
2122
disabled?: boolean;
2223
form?: string;
@@ -26,8 +27,11 @@ declare module 'react-simple-code-editor' {
2627
placeholder?: string;
2728
readOnly?: boolean;
2829
required?: boolean;
29-
onFocus?: (e: React.FocusEvent<HTMLTextAreaElement>) => unknown;
30-
onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => unknown;
30+
onClick?: (e: React.MouseEvent<HTMLTextAreaElement>) => void;
31+
onFocus?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
32+
onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
33+
onKeyUp?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
34+
onKeyDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
3135
}
3236
> {
3337
session: {

0 commit comments

Comments
 (0)