chore: changeset

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-10-14 16:27:53 +02:00
parent f63ea9a583
commit 39001f4091
2 changed files with 9 additions and 6 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-plugin-api': patch
---
Fixing issue with types for `ParamKeys` leading to type mismatches across versions
@@ -78,21 +78,19 @@ describe('RouteRef', () => {
validateType<ParamKeys<{ x: string; y: string }>>(['x', 'y']);
// @ts-expect-error
validateType<ParamKeys<{}>>(['asd']);
validateType<ParamKeys<{}>>(['foo']);
validateType<ParamKeys<{}>>([]);
// @ts-expect-error
validateType<ParamKeys<{ [key in string]: string }>>([1]);
validateType<ParamKeys<{ [key in string]: string }>>(['migrationId']);
validateType<ParamKeys<{ [key in string]: string }>>(['foo']);
// @ts-expect-error
validateType<ParamKeys<{ [key in string]: string } | undefined>>([1]);
validateType<ParamKeys<{ [key in string]: string } | undefined>>([
'migrationId',
]);
validateType<ParamKeys<{ [key in string]: string } | undefined>>(['foo']);
// @ts-expect-error
validateType<ParamKeys<undefined>>(['asd']);
validateType<ParamKeys<undefined>>(['foo']);
validateType<ParamKeys<undefined>>([]);
expect(true).toBeDefined();