File tree Expand file tree Collapse file tree 3 files changed +49
-2
lines changed Expand file tree Collapse file tree 3 files changed +49
-2
lines changed Original file line number Diff line number Diff line change
1
+ declare module 'react-simple-code-editor' {
2
+ import * as React from 'react' ;
3
+
4
+ export default class extends React . Component <
5
+ React . DetailedHTMLProps <
6
+ React . HTMLAttributes < HTMLDivElement > ,
7
+ HTMLDivElement
8
+ > & {
9
+ // Props for the component
10
+ value : string ;
11
+ onValueChange : ( value : string ) => unknown ;
12
+ highlight : ( value : string ) => string | React . ReactNode ;
13
+ tabSize ?: number ;
14
+ insertSpaces ?: boolean ;
15
+ ignoreTabKey ?: boolean ;
16
+ padding ?: number | string ;
17
+ style ?: object ;
18
+
19
+ // Props for the textarea
20
+ autoFocus ?: boolean ;
21
+ disabled ?: boolean ;
22
+ form ?: string ;
23
+ maxLength ?: number ;
24
+ minLength ?: number ;
25
+ name ?: string ;
26
+ placeholder ?: string ;
27
+ readOnly ?: boolean ;
28
+ required ?: boolean ;
29
+ onFocus ?: ( e : React . FocusEvent < HTMLTextAreaElement > ) => unknown ;
30
+ onBlur ?: ( e : React . FocusEvent < HTMLTextAreaElement > ) => unknown ;
31
+ }
32
+ > {
33
+ session : {
34
+ history : {
35
+ stack : Array < {
36
+ value : string ;
37
+ selectionStart : number ;
38
+ selectionEnd : number ;
39
+ timestamp : number ;
40
+ } > ;
41
+ offset : number ;
42
+ } ;
43
+ } ;
44
+ }
45
+ }
Original file line number Diff line number Diff line change 26
26
"registry" : " https://registry.npmjs.org/"
27
27
},
28
28
"main" : " lib/index.js" ,
29
+ "types" : " index.d.ts" ,
29
30
"files" : [
30
- " lib/"
31
+ " lib/" ,
32
+ " index.d.ts"
31
33
],
32
34
"repository" : {
33
35
"type" : " git" ,
Original file line number Diff line number Diff line change 3
3
4
4
import * as React from 'react' ;
5
5
6
- type Props = {
6
+ type Props = React . ElementConfig < 'div' > & {
7
7
// Props for the component
8
8
value : string ,
9
9
onValueChange : ( value : string ) => mixed ,
You can’t perform that action at this time.
0 commit comments