frontend-test-utils: fix implicit any types for TypeScript 6 compatibility
Add explicit type annotations to `.map()` callback parameters in `renderInTestApp` to prevent TS7006 errors with TypeScript 6, and update `@mswjs/interceptors` to 0.39.8 within the existing version range. Signed-off-by: Fredrik Adelöw <freben@spotify.com> Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/frontend-test-utils': patch
|
||||
---
|
||||
|
||||
Added explicit type annotations to `.map()` callback parameters in `renderInTestApp` to avoid implicit `any` errors with newer TypeScript versions.
|
||||
@@ -137,20 +137,22 @@ const appPluginOverride = appPlugin.withOverrides({
|
||||
coreExtensionData.reactElement(
|
||||
<nav>
|
||||
<ul>
|
||||
{inputs.items.map((item, index) => {
|
||||
const { icon, title, routeRef } = item.get(
|
||||
NavItemBlueprint.dataRefs.target,
|
||||
);
|
||||
{inputs.items.map(
|
||||
(item: (typeof inputs.items)[number], index: number) => {
|
||||
const { icon, title, routeRef } = item.get(
|
||||
NavItemBlueprint.dataRefs.target,
|
||||
);
|
||||
|
||||
return (
|
||||
<NavItem
|
||||
key={index}
|
||||
icon={icon}
|
||||
title={title}
|
||||
routeRef={routeRef}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
return (
|
||||
<NavItem
|
||||
key={index}
|
||||
icon={icon}
|
||||
title={title}
|
||||
routeRef={routeRef}
|
||||
/>
|
||||
);
|
||||
},
|
||||
)}
|
||||
</ul>
|
||||
</nav>,
|
||||
),
|
||||
|
||||
@@ -11908,8 +11908,8 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@mswjs/interceptors@npm:^0.39.1":
|
||||
version: 0.39.6
|
||||
resolution: "@mswjs/interceptors@npm:0.39.6"
|
||||
version: 0.39.8
|
||||
resolution: "@mswjs/interceptors@npm:0.39.8"
|
||||
dependencies:
|
||||
"@open-draft/deferred-promise": "npm:^2.2.0"
|
||||
"@open-draft/logger": "npm:^0.3.0"
|
||||
@@ -11917,7 +11917,7 @@ __metadata:
|
||||
is-node-process: "npm:^1.2.0"
|
||||
outvariant: "npm:^1.4.3"
|
||||
strict-event-emitter: "npm:^0.5.1"
|
||||
checksum: 10/c87d3edf08353bde825c87b151b24d538070540ab419206cef1774c932e888af0f920183182fb7c94c3eee42068da5a0a5855853fded8514f33c870921ef37ec
|
||||
checksum: 10/d92546cf9bf670ddb927c53f5fa19f0554b7475a264ead4e1ae2339874f4312fe4ada5d42588f27eea3577bee29fa8f46889d398f0e7ecb3f7a4c1d3e0b71bdc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user