generated from mirrors/plugin-sample-vite-svelte
Add offline spell-checking
All checks were successful
Build on Push and create Release on Tag / build (push) Successful in 4m2s
All checks were successful
Build on Push and create Release on Tag / build (push) Successful in 4m2s
This commit is contained in:
parent
a13ac05afb
commit
032e7f0b8c
11 changed files with 252 additions and 64 deletions
15
src/spellChecker.ts
Normal file
15
src/spellChecker.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
export type Language = { name: string; code: string; longCode: string; }
|
||||
|
||||
export type Suggestion = {
|
||||
message: string
|
||||
shortMessage: string
|
||||
replacements: string[]
|
||||
offset: number
|
||||
length: number
|
||||
typeName: string
|
||||
}
|
||||
|
||||
export interface SpellChecker {
|
||||
check(text: string, languages: string[]): Promise<Suggestion[]>
|
||||
getLanguages(): Promise<Language[]>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue