Skip to content

Commit f3263ca

Browse files
Merge pull request #2037 from rickdunkin/bugfix/show-invisibles-type
Bugfix: `showInvisibles` type
2 parents 24714c2 + b693b0f commit f3263ca

File tree

2 files changed

+144
-144
lines changed

2 files changed

+144
-144
lines changed

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export interface IAceOptions {
7878
vScrollBarAlwaysVisible?: boolean;
7979
highlightGutterLine?: boolean;
8080
animatedScroll?: boolean;
81-
showInvisibles?: boolean;
81+
showInvisibles?: string | boolean;
8282
showPrintMargin?: boolean;
8383
printMarginColumn?: number;
8484
printMargin?: boolean | number;

types.d.ts

Lines changed: 143 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -2,175 +2,175 @@
22
// Project: https://github.com/securingsincity/react-ace
33
// Definitions by: Alberto Nicoletti <https://github.com/illbexyz>
44

5-
import { Component, CSSProperties } from 'react'
5+
import { Component, CSSProperties } from "react";
66

77
export interface Annotation {
8-
row: number
9-
column: number
10-
type: string
11-
text: string
8+
row: number;
9+
column: number;
10+
type: string;
11+
text: string;
1212
}
1313

1414
export interface Marker {
15-
startRow: number
16-
startCol: number
17-
endRow: number
18-
endCol: number
19-
className: string
20-
type: string
15+
startRow: number;
16+
startCol: number;
17+
endRow: number;
18+
endCol: number;
19+
className: string;
20+
type: string;
2121
}
2222

2323
export interface CommandBindKey {
24-
win: string
25-
mac: string
24+
win: string;
25+
mac: string;
2626
}
2727

2828
export interface Command {
29-
name: string
30-
bindKey: CommandBindKey
31-
exec(editor: any): void
29+
name: string;
30+
bindKey: CommandBindKey;
31+
exec(editor: any): void;
3232
}
3333

3434
export interface Selection {
35-
getCursor(): Annotation;
35+
getCursor(): Annotation;
3636
}
3737

3838
/**
3939
* See https://github.com/ajaxorg/ace/wiki/Configuring-Ace
4040
*/
4141
export interface AceOptions {
42-
selectionStyle?: "line" | "text"
43-
highlightActiveLine?: boolean
44-
highlightSelectedWord?: boolean
45-
readOnly?: boolean
46-
cursorStyle?: "ace"|"slim"|"smooth"|"wide"
47-
mergeUndoDeltas?: false | true | "always"
48-
behavioursEnabled?: boolean
49-
wrapBehavioursEnabled?: boolean
50-
/** this is needed if editor is inside scrollable page */
51-
autoScrollEditorIntoView?: boolean
52-
hScrollBarAlwaysVisible?: boolean
53-
vScrollBarAlwaysVisible?: boolean
54-
highlightGutterLine?: boolean
55-
animatedScroll?: boolean
56-
showInvisibles?: boolean
57-
showPrintMargin?: boolean
58-
printMarginColumn?: number;
59-
printMargin?: boolean | number;
60-
fadeFoldWidgets?: boolean
61-
showFoldWidgets?: boolean
62-
showLineNumbers?: boolean
63-
showGutter?: boolean
64-
displayIndentGuides?: boolean
65-
/** number or css font-size string */
66-
fontSize?: number | string
67-
/** css */
68-
fontFamily?: string
69-
maxLines?: number
70-
minLines?: number
71-
scrollPastEnd?: boolean
72-
fixedWidthGutter?: boolean
73-
/** path to a theme e.g "ace/theme/textmate" */
74-
theme?: string
75-
scrollSpeed?: number
76-
dragDelay?: number
77-
dragEnabled?: boolean
78-
focusTimout?: number
79-
tooltipFollowsMouse?: boolean
80-
firstLineNumber?: number
81-
overwrite?: boolean
82-
newLineMode?: boolean
83-
useWorker?: boolean
84-
useSoftTabs?: boolean
85-
tabSize?: number
86-
wrap?: boolean
87-
foldStyle?: "markbegin"|"markbeginend"|"manual"
88-
/** path to a mode e.g "ace/mode/text" */
89-
mode?: string
90-
/** on by default */
91-
enableMultiselect?: boolean
92-
enableEmmet?: boolean
93-
enableBasicAutocompletion?: boolean
94-
enableLiveAutocompletion?: boolean
95-
enableSnippets?: boolean
96-
spellcheck?: boolean
97-
useElasticTabstops?: boolean
42+
selectionStyle?: "line" | "text";
43+
highlightActiveLine?: boolean;
44+
highlightSelectedWord?: boolean;
45+
readOnly?: boolean;
46+
cursorStyle?: "ace" | "slim" | "smooth" | "wide";
47+
mergeUndoDeltas?: false | true | "always";
48+
behavioursEnabled?: boolean;
49+
wrapBehavioursEnabled?: boolean;
50+
/** this is needed if editor is inside scrollable page */
51+
autoScrollEditorIntoView?: boolean;
52+
hScrollBarAlwaysVisible?: boolean;
53+
vScrollBarAlwaysVisible?: boolean;
54+
highlightGutterLine?: boolean;
55+
animatedScroll?: boolean;
56+
showInvisibles?: string | boolean;
57+
showPrintMargin?: boolean;
58+
printMarginColumn?: number;
59+
printMargin?: boolean | number;
60+
fadeFoldWidgets?: boolean;
61+
showFoldWidgets?: boolean;
62+
showLineNumbers?: boolean;
63+
showGutter?: boolean;
64+
displayIndentGuides?: boolean;
65+
/** number or css font-size string */
66+
fontSize?: number | string;
67+
/** css */
68+
fontFamily?: string;
69+
maxLines?: number;
70+
minLines?: number;
71+
scrollPastEnd?: boolean;
72+
fixedWidthGutter?: boolean;
73+
/** path to a theme e.g "ace/theme/textmate" */
74+
theme?: string;
75+
scrollSpeed?: number;
76+
dragDelay?: number;
77+
dragEnabled?: boolean;
78+
focusTimout?: number;
79+
tooltipFollowsMouse?: boolean;
80+
firstLineNumber?: number;
81+
overwrite?: boolean;
82+
newLineMode?: boolean;
83+
useWorker?: boolean;
84+
useSoftTabs?: boolean;
85+
tabSize?: number;
86+
wrap?: boolean;
87+
foldStyle?: "markbegin" | "markbeginend" | "manual";
88+
/** path to a mode e.g "ace/mode/text" */
89+
mode?: string;
90+
/** on by default */
91+
enableMultiselect?: boolean;
92+
enableEmmet?: boolean;
93+
enableBasicAutocompletion?: boolean;
94+
enableLiveAutocompletion?: boolean;
95+
enableSnippets?: boolean;
96+
spellcheck?: boolean;
97+
useElasticTabstops?: boolean;
9898
}
9999

100100
export interface EditorProps {
101-
$blockScrolling?: number | boolean
102-
$blockSelectEnabled?: boolean
103-
$enableBlockSelect?: boolean
104-
$enableMultiselect?: boolean
105-
$highlightPending?: boolean
106-
$highlightTagPending?: boolean
107-
$multiselectOnSessionChange?: (...args: any[]) => any
108-
$onAddRange?: (...args: any[]) => any
109-
$onChangeAnnotation?: (...args: any[]) => any
110-
$onChangeBackMarker?: (...args: any[]) => any
111-
$onChangeBreakpoint?: (...args: any[]) => any
112-
$onChangeFold?: (...args: any[]) => any
113-
$onChangeFrontMarker?: (...args: any[]) => any
114-
$onChangeMode?: (...args: any[]) => any
115-
$onChangeTabSize?: (...args: any[]) => any
116-
$onChangeWrapLimit?: (...args: any[]) => any
117-
$onChangeWrapMode?: (...args: any[]) => any
118-
$onCursorChange?: (...args: any[]) => any
119-
$onDocumentChange?: (...args: any[]) => any
120-
$onMultiSelect?: (...args: any[]) => any
121-
$onRemoveRange?: (...args: any[]) => any
122-
$onScrollLeftChange?: (...args: any[]) => any
123-
$onScrollTopChange?: (...args: any[]) => any
124-
$onSelectionChange?: (...args: any[]) => any
125-
$onSingleSelect?: (...args: any[]) => any
126-
$onTokenizerUpdate?: (...args: any[]) => any
101+
$blockScrolling?: number | boolean;
102+
$blockSelectEnabled?: boolean;
103+
$enableBlockSelect?: boolean;
104+
$enableMultiselect?: boolean;
105+
$highlightPending?: boolean;
106+
$highlightTagPending?: boolean;
107+
$multiselectOnSessionChange?: (...args: any[]) => any;
108+
$onAddRange?: (...args: any[]) => any;
109+
$onChangeAnnotation?: (...args: any[]) => any;
110+
$onChangeBackMarker?: (...args: any[]) => any;
111+
$onChangeBreakpoint?: (...args: any[]) => any;
112+
$onChangeFold?: (...args: any[]) => any;
113+
$onChangeFrontMarker?: (...args: any[]) => any;
114+
$onChangeMode?: (...args: any[]) => any;
115+
$onChangeTabSize?: (...args: any[]) => any;
116+
$onChangeWrapLimit?: (...args: any[]) => any;
117+
$onChangeWrapMode?: (...args: any[]) => any;
118+
$onCursorChange?: (...args: any[]) => any;
119+
$onDocumentChange?: (...args: any[]) => any;
120+
$onMultiSelect?: (...args: any[]) => any;
121+
$onRemoveRange?: (...args: any[]) => any;
122+
$onScrollLeftChange?: (...args: any[]) => any;
123+
$onScrollTopChange?: (...args: any[]) => any;
124+
$onSelectionChange?: (...args: any[]) => any;
125+
$onSingleSelect?: (...args: any[]) => any;
126+
$onTokenizerUpdate?: (...args: any[]) => any;
127127
}
128128

129129
export interface AceEditorProps {
130-
name?: string
131-
/** For available modes see https://github.com/thlorenz/brace/tree/master/mode */
132-
mode?: string
133-
/** For available themes see https://github.com/thlorenz/brace/tree/master/theme */
134-
theme?: string
135-
height?: string
136-
width?: string
137-
className?: string
138-
fontSize?: number
139-
showGutter?: boolean
140-
showPrintMargin?: boolean
141-
highlightActiveLine?: boolean
142-
focus?: boolean
143-
cursorStart?: number
144-
wrapEnabled?: boolean
145-
readOnly?: boolean
146-
minLines?: number
147-
maxLines?: number
148-
enableBasicAutocompletion?: boolean
149-
enableLiveAutocompletion?: boolean
150-
tabSize?: number
151-
value?: string
152-
defaultValue?: string
153-
scrollMargin?: number[]
154-
onLoad?: (editor: EditorProps) => void
155-
onBeforeLoad?: (ace: any) => void
156-
onChange?: (value: string, event?: any) => void
157-
onInput?: (value: string, event?: any) => void
158-
onSelectionChange?: (selectedText: string, event?: any) => void
159-
onCopy?: (value: string) => void
160-
onPaste?: (value: string) => void
161-
onFocus?: (event: any) => void
162-
onBlur?: (event: any) => void
163-
onValidate?: (annotations: Array<Annotation>) => void
164-
onScroll?: (editor: EditorProps) => void
165-
onCursorChange?: (selection: Selection) => void;
166-
editorProps?: EditorProps
167-
setOptions?: AceOptions
168-
keyboardHandler?: string
169-
commands?: Array<Command>
170-
annotations?: Array<Annotation>
171-
markers?: Array<Marker>
172-
style?: CSSProperties
173-
debounceChangePeriod?: number
130+
name?: string;
131+
/** For available modes see https://github.com/thlorenz/brace/tree/master/mode */
132+
mode?: string;
133+
/** For available themes see https://github.com/thlorenz/brace/tree/master/theme */
134+
theme?: string;
135+
height?: string;
136+
width?: string;
137+
className?: string;
138+
fontSize?: number;
139+
showGutter?: boolean;
140+
showPrintMargin?: boolean;
141+
highlightActiveLine?: boolean;
142+
focus?: boolean;
143+
cursorStart?: number;
144+
wrapEnabled?: boolean;
145+
readOnly?: boolean;
146+
minLines?: number;
147+
maxLines?: number;
148+
enableBasicAutocompletion?: boolean;
149+
enableLiveAutocompletion?: boolean;
150+
tabSize?: number;
151+
value?: string;
152+
defaultValue?: string;
153+
scrollMargin?: number[];
154+
onLoad?: (editor: EditorProps) => void;
155+
onBeforeLoad?: (ace: any) => void;
156+
onChange?: (value: string, event?: any) => void;
157+
onInput?: (value: string, event?: any) => void;
158+
onSelectionChange?: (selectedText: string, event?: any) => void;
159+
onCopy?: (value: string) => void;
160+
onPaste?: (value: string) => void;
161+
onFocus?: (event: any) => void;
162+
onBlur?: (event: any) => void;
163+
onValidate?: (annotations: Array<Annotation>) => void;
164+
onScroll?: (editor: EditorProps) => void;
165+
onCursorChange?: (selection: Selection) => void;
166+
editorProps?: EditorProps;
167+
setOptions?: AceOptions;
168+
keyboardHandler?: string;
169+
commands?: Array<Command>;
170+
annotations?: Array<Annotation>;
171+
markers?: Array<Marker>;
172+
style?: CSSProperties;
173+
debounceChangePeriod?: number;
174174
}
175175

176176
export default class AceEditor extends Component<AceEditorProps, {}> {}

0 commit comments

Comments
 (0)