core-plugin-api: extract InternalTranslationResourceLoader type
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -25,13 +25,18 @@ export interface TranslationResource<TId extends string = string> {
|
||||
id: TId;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export type InternalTranslationResourceLoader = () => Promise<{
|
||||
messages: { [key in string]: string | null };
|
||||
}>;
|
||||
|
||||
/** @internal */
|
||||
export interface InternalTranslationResource<TId extends string = string>
|
||||
extends TranslationResource<TId> {
|
||||
version: 'v1';
|
||||
resources: Array<{
|
||||
language: string;
|
||||
loader(): Promise<{ messages: { [key in string]: string | null } }>;
|
||||
loader: InternalTranslationResourceLoader;
|
||||
}>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user