Skip to content

Commit cdd8ea8

Browse files
Introduce ProofreaderProofreadOptions
1 parent 78766d0 commit cdd8ea8

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,14 @@ interface ProofreaderFactory {
247247
static Promise<Proofreader> create(optional ProofreaderCreateOptions options = {});
248248
static Promise<AIAvailability> availability(optional ProofreaderCreateCoreOptions options = {});
249249

250-
Promise<ProofreadResult> proofread(DOMString input);
251-
ReadableStream proofreadStreaming(DOMString input);
250+
Promise<ProofreadResult> proofread(
251+
DOMString input,
252+
optional ProofreaderProofreadOptions options = {}
253+
);
254+
ReadableStream proofreadStreaming(
255+
DOMString input,
256+
optional ProofreaderProofreadOptions options = {}
257+
);
252258

253259
// whether to provide correction types for each correction as part of the proofreading result.
254260
readonly attribute boolean includeCorrectionTypes;
@@ -265,25 +271,29 @@ dictionary ProofreaderCreateCoreOptions {
265271
boolean includeCorrectionExplanations = false;
266272
DOMString correctionExplanationLanguage;
267273
sequence<DOMString> expectedInputLanguages;
268-
}
274+
};
269275

270276
dictionary ProofreaderCreateOptions : ProofreaderCreateCoreOptions {
271277
AbortSignal signal;
272278
AICreateMonitorCallback monitor;
273279
};
274280

281+
dictionary ProofreaderProofreadOptions {
282+
AbortSignal signal;
283+
};
284+
275285
dictionary ProofreadResult {
276286
DOMString correctedInput;
277287
sequence<ProofreadCorrection> corrections;
278-
}
288+
};
279289

280290
dictionary ProofreadCorrection {
281291
unsigned long long startIndex;
282292
unsigned long long endIndex;
283293
DOMString correction;
284294
CorrectionType type;
285295
DOMString explanation;
286-
}
296+
};
287297

288298
enum CorrectionType {
289299
"spelling",

0 commit comments

Comments
 (0)