From cdd8ea81f9da380b0ba8c596bb3e25c71cc263de Mon Sep 17 00:00:00 2001 From: Christian Liebel Date: Wed, 4 Jun 2025 13:14:39 +0200 Subject: [PATCH] Introduce `ProofreaderProofreadOptions` --- README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ef41ec2..d7fb7df 100644 --- a/README.md +++ b/README.md @@ -247,8 +247,14 @@ interface ProofreaderFactory { static Promise create(optional ProofreaderCreateOptions options = {}); static Promise availability(optional ProofreaderCreateCoreOptions options = {}); - Promise proofread(DOMString input); - ReadableStream proofreadStreaming(DOMString input); + Promise proofread( + DOMString input, + optional ProofreaderProofreadOptions options = {} + ); + ReadableStream proofreadStreaming( + DOMString input, + optional ProofreaderProofreadOptions options = {} + ); // whether to provide correction types for each correction as part of the proofreading result. readonly attribute boolean includeCorrectionTypes; @@ -265,17 +271,21 @@ dictionary ProofreaderCreateCoreOptions { boolean includeCorrectionExplanations = false; DOMString correctionExplanationLanguage; sequence expectedInputLanguages; -} +}; dictionary ProofreaderCreateOptions : ProofreaderCreateCoreOptions { AbortSignal signal; AICreateMonitorCallback monitor; }; +dictionary ProofreaderProofreadOptions { + AbortSignal signal; +}; + dictionary ProofreadResult { DOMString correctedInput; sequence corrections; -} +}; dictionary ProofreadCorrection { unsigned long long startIndex; @@ -283,7 +293,7 @@ dictionary ProofreadCorrection { DOMString correction; CorrectionType type; DOMString explanation; -} +}; enum CorrectionType { "spelling",