Hey there, I have a global.d.ts file with the following content:
import { type Axios } from 'axios';
import type routeFn from 'ziggy-js';
import type * as React from 'react';
declare global {
interface Window {
axios: Axios
}
declare module 'react' {
// eslint-disable-next-line @typescript-eslint/ban-types
type FC<P = {}> = React.FC<P> & {
layout?: (page: React.ReactNode) => React.ReactNode
};
}
let route: typeof routeFn;
}
export {};
Here I declare the react module with a custom FC type. The editor understands and references to the global.d.ts just fine as seen in the screenshot but TypeScript keeps complaining about it. Any idea on how to fix?