From 43ed18e9d988c17a04d7dbc1ae9a3cd9638a76ca Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 15 Sep 2023 18:03:10 +0200 Subject: [PATCH] core-plugin-api: API report update for TranslationFunction Signed-off-by: Patrik Oldsberg --- packages/core-plugin-api/alpha-api-report.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/core-plugin-api/alpha-api-report.md b/packages/core-plugin-api/alpha-api-report.md index d689184083..bea27cfa5e 100644 --- a/packages/core-plugin-api/alpha-api-report.md +++ b/packages/core-plugin-api/alpha-api-report.md @@ -107,14 +107,21 @@ export type TranslationApi = { export const translationApiRef: ApiRef; // @alpha (undocumented) -export type TranslationFunction< +export interface TranslationFunction< TMessages extends { [key in string]: string; }, -> = ( - key: TKey, - options?: TranslationOptions, -) => TMessages[TKey]; +> { + // (undocumented) + >( + key: TKey, + ...[args]: TranslationFunctionOptions< + NestedMessageKeys>, + PluralKeys, + CollapsedMessages + > + ): CollapsedMessages[TKey]; +} // @alpha export interface TranslationMessages< @@ -155,9 +162,6 @@ export interface TranslationMessagesOptions< ref: TranslationRef_2; } -// @alpha (undocumented) -export interface TranslationOptions {} - // @alpha (undocumented) export interface TranslationRef< TId extends string = string,