Skip to content

Commit 65e9028

Browse files
committed
Add overtype types.
1 parent b882b2c commit 65e9028

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
declare module 'overtype' {
2+
interface OverTypeOptions {
3+
fontSize?: number
4+
lineHeight?: number
5+
fontFamily?: string
6+
theme?: string | ThemeObject
7+
autofocus?: boolean
8+
placeholder?: string
9+
value?: string
10+
autoResize?: boolean
11+
minHeight?: number
12+
maxHeight?: number
13+
toolbar?: boolean
14+
onChange?: (value: string) => void
15+
onKeydown?: (event: KeyboardEvent) => void
16+
}
17+
18+
interface ThemeObject {
19+
[key: string]: string
20+
}
21+
22+
class OverType {
23+
constructor(target: string | Element | NodeList | Element[], options?: OverTypeOptions)
24+
25+
getValue(): string
26+
setValue(value: string): void
27+
getRenderedHTML(processContent?: boolean): string
28+
getPreviewHTML(): string
29+
setTheme(theme: string | ThemeObject): void
30+
showStats(show: boolean): void
31+
showPlainTextarea(show: boolean): void
32+
showPreviewMode(show: boolean): void
33+
34+
static init(selector: string, options?: OverTypeOptions): OverType[]
35+
}
36+
37+
export = OverType
38+
}

browser-extension/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242
},
4343
"exclude": ["node_modules", ".output", "dist"],
4444
"extends": "./.wxt/tsconfig.json",
45-
"include": ["src/entrypoints/**/*", "*.config.ts", ".wxt/wxt.d.ts", "tests/**/*"]
45+
"include": ["src/**/*", "*.config.ts", ".wxt/wxt.d.ts", "tests/**/*"]
4646
}

0 commit comments

Comments
 (0)