import type * as ReactModule from "react"; /** * `@digdir/designsystemet-web` registers its custom elements (`ds-tabs`, * `ds-field`, …) in `React.JSX.IntrinsicElements` and types them with * `ReactTypes.*` — but its bundled `index.d.ts` lost the matching * `import type * as ReactTypes from "react"`. Those entries therefore resolve * to an error type, which `skipLibCheck` hides while `React.ElementType` * (a mapped type over `keyof JSX.IntrinsicElements`) silently degrades. * * The fallout lands on MUI, which is only pulled into the same program here: * `` stops accepting the element's own props, and MUI * callback parameters (`sx` theme, `onClick` event, `Tabs onChange`) turn into * implicit `any`. * * Declaring the `ReactTypes` namespace globally gives that file what it is * missing. Remove this once Designsystemet ships the import in its `.d.ts`. */ declare global { namespace ReactTypes { type HTMLAttributes = ReactModule.HTMLAttributes; type DetailedHTMLProps, T> = ReactModule.DetailedHTMLProps; } }