@@ -247,8 +247,14 @@ interface Proofreader {
247
247
static Promise < Proofreader> create (optional ProofreaderCreateOptions options = {});
248
248
static Promise < AIAvailability> availability (optional ProofreaderCreateCoreOptions options = {});
249
249
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
+ );
252
258
253
259
// whether to provide correction types for each correction as part of the proofreading result.
254
260
readonly attribute boolean includeCorrectionTypes;
@@ -265,25 +271,29 @@ dictionary ProofreaderCreateCoreOptions {
265
271
boolean includeCorrectionExplanations = false ;
266
272
DOMString correctionExplanationLanguage;
267
273
sequence< DOMString > expectedInputLanguages;
268
- }
274
+ };
269
275
270
276
dictionary ProofreaderCreateOptions : ProofreaderCreateCoreOptions {
271
277
AbortSignal signal;
272
278
AICreateMonitorCallback monitor;
273
279
};
274
280
281
+ dictionary ProofreaderProofreadOptions {
282
+ AbortSignal signal;
283
+ };
284
+
275
285
dictionary ProofreadResult {
276
286
DOMString correctedInput;
277
287
sequence< ProofreadCorrection> corrections;
278
- }
288
+ };
279
289
280
290
dictionary ProofreadCorrection {
281
291
unsigned long long startIndex;
282
292
unsigned long long endIndex;
283
293
DOMString correction;
284
294
CorrectionType type;
285
295
DOMString explanation;
286
- }
296
+ };
287
297
288
298
enum CorrectionType {
289
299
" spelling" ,
0 commit comments