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:
Johan Haals
2023-09-11 16:48:01 +02:00
parent 34ffe5654c
commit 1cfe070efd
6 changed files with 12 additions and 11 deletions
@@ -23,6 +23,8 @@ import mapValues from 'lodash/mapValues';
/** @internal */
export interface ExtensionInstance {
readonly $$type: '@backstage/ExtensionInstance';
readonly id: string;
/**
* Get concrete value for the given extension data reference. Returns undefined if no value is available.
@@ -32,7 +34,6 @@ export interface ExtensionInstance {
* Maps input names to the actual instances given to them.
*/
readonly attachments: Map<string, ExtensionInstance[]>;
readonly $$type: 'extension-instance';
}
/** @internal */
@@ -86,12 +87,12 @@ export function createExtensionInstance(options: {
}
return {
$$type: '@backstage/ExtensionInstance',
id: options.extension.id,
getData<T>(ref: ExtensionDataRef<T>): T | undefined {
return extensionData.get(ref.id) as T | undefined;
},
attachments,
$$type: 'extension-instance',
};
}