Unverified Commit ac5e593b authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Better typesafety for `interopDefault` (#88486)

parent b6cf4ea2
export function interopDefault(mod: any) {
export function interopDefault<T>(mod: { default: T } | T): T {
// @ts-ignore
return mod.default || mod
}
......@@ -308,7 +308,9 @@ async function loadComponentsImpl<
ComponentMod
return {
// @ts-expect-error this is indeed `{} || AppType` and not always `AppType`
App,
// @ts-expect-error this is indeed `{} || DocumentType` and not always `DocumentType`
Document,
Component,
buildManifest,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment