frontend-plugin-api: update extension data ref declaration to allow embedding of ID in type

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-07-20 12:47:09 +02:00
parent 2ab03460d5
commit 31bfc4417f
27 changed files with 204 additions and 77 deletions
@@ -32,9 +32,11 @@ import { resolveAppTree } from './resolveAppTree';
import { resolveExtensionDefinition } from '../../../frontend-plugin-api/src/wiring/resolveExtensionDefinition';
import { withLogCollector } from '@backstage/test-utils';
const testDataRef = createExtensionDataRef<string>('test');
const otherDataRef = createExtensionDataRef<number>('other');
const inputMirrorDataRef = createExtensionDataRef<unknown>('mirror');
const testDataRef = createExtensionDataRef<string>().with({ id: 'test' });
const otherDataRef = createExtensionDataRef<number>().with({ id: 'other' });
const inputMirrorDataRef = createExtensionDataRef<unknown>().with({
id: 'mirror',
});
const simpleExtension = resolveExtensionDefinition(
createExtension({