core-app-api: avoid dependency on core-plugin-api/alpha
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -64,8 +64,6 @@ import { SessionState } from '@backstage/core-plugin-api';
|
||||
import { StorageApi } from '@backstage/core-plugin-api';
|
||||
import { StorageValueSnapshot } from '@backstage/core-plugin-api';
|
||||
import { SubRouteRef } from '@backstage/core-plugin-api';
|
||||
import { TranslationMessages } from '@backstage/core-plugin-api/alpha';
|
||||
import { TranslationResource } from '@backstage/core-plugin-api/alpha';
|
||||
|
||||
// @public
|
||||
export class AlertApiForwarder implements AlertApi {
|
||||
@@ -225,7 +223,18 @@ export type AppOptions = {
|
||||
__experimentalTranslations?: {
|
||||
defaultLanguage?: string;
|
||||
availableLanguages?: string[];
|
||||
resources?: Array<TranslationMessages | TranslationResource>;
|
||||
resources?: Array<
|
||||
| {
|
||||
$$type: '@backstage/TranslationResource';
|
||||
id: string;
|
||||
}
|
||||
| {
|
||||
$$type: '@backstage/TranslationMessages';
|
||||
id: string;
|
||||
full: boolean;
|
||||
messages: Record<string, string>;
|
||||
}
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -27,10 +27,6 @@ import {
|
||||
FeatureFlag,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { AppConfig } from '@backstage/config';
|
||||
import {
|
||||
TranslationMessages,
|
||||
TranslationResource,
|
||||
} from '@backstage/core-plugin-api/alpha';
|
||||
|
||||
/**
|
||||
* Props for the `BootErrorPage` component of {@link AppComponents}.
|
||||
@@ -286,7 +282,16 @@ export type AppOptions = {
|
||||
__experimentalTranslations?: {
|
||||
defaultLanguage?: string;
|
||||
availableLanguages?: string[];
|
||||
resources?: Array<TranslationMessages | TranslationResource>;
|
||||
resources?: Array<
|
||||
// Separate declaration for now to avoid dependency on core-plugin-api/alpha and TS 5.0
|
||||
| { $$type: '@backstage/TranslationResource'; id: string }
|
||||
| {
|
||||
$$type: '@backstage/TranslationMessages';
|
||||
id: string;
|
||||
full: boolean;
|
||||
messages: Record<string, string>;
|
||||
}
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user