harper.js 0.20.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/harper.d.ts CHANGED
@@ -87,6 +87,11 @@ export declare interface Linter {
87
87
  importIgnoredLints(json: string): Promise<void>;
88
88
  /** Clear records of all previously ignored lints. */
89
89
  clearIgnoredLints(): Promise<void>;
90
+ /** Import words into the dictionary. This is a significant operation, so try to batch words. */
91
+ importWords(words: string[]): Promise<void>;
92
+ /** Export all added words from the dictionary. Note that this will NOT export anything from the curated dictionary,
93
+ * only words from previous calls to `this.importWords`. */
94
+ exportWords(): Promise<string[]>;
90
95
  }
91
96
 
92
97
  /** The option used to configure the parser for an individual linting operation. */
@@ -118,6 +123,8 @@ export declare class LocalLinter implements Linter {
118
123
  exportIgnoredLints(): Promise<string>;
119
124
  importIgnoredLints(json: string): Promise<void>;
120
125
  clearIgnoredLints(): Promise<void>;
126
+ importWords(words: string[]): Promise<void>;
127
+ exportWords(): Promise<string[]>;
121
128
  }
122
129
 
123
130
  /**
@@ -198,6 +205,8 @@ export declare class WorkerLinter implements Linter {
198
205
  exportIgnoredLints(): Promise<string>;
199
206
  importIgnoredLints(json: string): Promise<void>;
200
207
  clearIgnoredLints(): Promise<void>;
208
+ importWords(words: string[]): Promise<void>;
209
+ exportWords(): Promise<string[]>;
201
210
  /** Run a procedure on the remote worker. */
202
211
  private rpc;
203
212
  private submitRemainingRequests;