frontend-app-api: Rename $$type to conform with backend types
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com> Co-authored-by: Philipp Hugenroth <philipph@spotify.com> Co-authored-by: Fredrik Adelöw <freben@gmail.com> Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -24,7 +24,7 @@ export type AnyExtensionDataMap = {
|
||||
// @public (undocumented)
|
||||
export interface BackstagePlugin {
|
||||
// (undocumented)
|
||||
$$type: 'backstage-plugin';
|
||||
$$type: '@backstage/BackstagePlugin';
|
||||
// (undocumented)
|
||||
extensions: Extension<unknown>[];
|
||||
// (undocumented)
|
||||
@@ -176,7 +176,7 @@ export function createSchemaFromZod<TOutput, TInput>(
|
||||
// @public (undocumented)
|
||||
export interface Extension<TConfig> {
|
||||
// (undocumented)
|
||||
$$type: 'extension';
|
||||
$$type: '@backstage/Extension';
|
||||
// (undocumented)
|
||||
at: string;
|
||||
// (undocumented)
|
||||
@@ -268,7 +268,7 @@ export type ExtensionDataRef<
|
||||
id: string;
|
||||
T: TData;
|
||||
config: TConfig;
|
||||
$$type: 'extension-data';
|
||||
$$type: '@backstage/ExtensionDataRef';
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
|
||||
@@ -87,7 +87,7 @@ export function createExtension<
|
||||
return {
|
||||
...options,
|
||||
disabled: options.disabled ?? false,
|
||||
$$type: 'extension',
|
||||
$$type: '@backstage/Extension',
|
||||
inputs: options.inputs ?? {},
|
||||
factory({ bind, config, inputs }) {
|
||||
// TODO: Simplify this, but TS wouldn't infer the input type for some reason
|
||||
|
||||
@@ -22,7 +22,7 @@ export type ExtensionDataRef<
|
||||
id: string;
|
||||
T: TData;
|
||||
config: TConfig;
|
||||
$$type: 'extension-data';
|
||||
$$type: '@backstage/ExtensionDataRef';
|
||||
};
|
||||
|
||||
/** @public */
|
||||
@@ -40,7 +40,7 @@ export function createExtensionDataRef<TData>(
|
||||
): ConfigurableExtensionDataRef<TData> {
|
||||
return {
|
||||
id,
|
||||
$$type: 'extension-data',
|
||||
$$type: '@backstage/ExtensionDataRef',
|
||||
config: {},
|
||||
optional() {
|
||||
return { ...this, config: { ...this.config, optional: true } };
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface PluginOptions {
|
||||
|
||||
/** @public */
|
||||
export interface BackstagePlugin {
|
||||
$$type: 'backstage-plugin';
|
||||
$$type: '@backstage/BackstagePlugin';
|
||||
id: string;
|
||||
extensions: Extension<unknown>[];
|
||||
}
|
||||
@@ -33,7 +33,7 @@ export interface BackstagePlugin {
|
||||
export function createPlugin(options: PluginOptions): BackstagePlugin {
|
||||
return {
|
||||
...options,
|
||||
$$type: 'backstage-plugin',
|
||||
$$type: '@backstage/BackstagePlugin',
|
||||
extensions: options.extensions ?? [],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export type AnyExtensionDataMap = {
|
||||
|
||||
/** @public */
|
||||
export interface Extension<TConfig> {
|
||||
$$type: 'extension';
|
||||
$$type: '@backstage/Extension';
|
||||
id: string;
|
||||
at: string;
|
||||
disabled: boolean;
|
||||
|
||||
Reference in New Issue
Block a user