@@ -247,8 +247,14 @@ interface Proofreader {
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
270276dictionary ProofreaderCreateOptions : ProofreaderCreateCoreOptions {
271277 AbortSignal signal;
272278 AICreateMonitorCallback monitor;
273279};
274280
281+ dictionary ProofreaderProofreadOptions {
282+ AbortSignal signal;
283+ };
284+
275285dictionary ProofreadResult {
276286 DOMString correctedInput;
277287 sequence< ProofreadCorrection> corrections;
278- }
288+ };
279289
280290dictionary ProofreadCorrection {
281291 unsigned long long startIndex;
282292 unsigned long long endIndex;
283293 DOMString correction;
284294 CorrectionType type;
285295 DOMString explanation;
286- }
296+ };
287297
288298enum CorrectionType {
289299 " spelling" ,
0 commit comments