In documentation https://mathlive.io/mathfield/guides/react/#using-a-mathfield-with-react-and-typescript
For React 19 need to replace declare global {...} with
declare module "react/jsx-runtime" {
namespace JSX {
interface IntrinsicElements {
"math-field": DetailedHTMLProps<HTMLAttributes<MathfieldElement>, MathfieldElement>;
}
}
}
export {};
See https://stackoverflow.com/questions/79580197/typescript-cant-handle-new-element-in-jsx-intrinsicelements-in-new-vite-project