I have a custom type definition in types.t.ds in the following folder structure
src
typings
types.t.ds
In the tsconfig.json, I have included it as
"include": ["src/typings/**/*.d.ts"]
My type definition is the following
declare namespace App {
interface HTMLProps<T> {
customFunction?: (event: MouseEvent) => void;
}
}
I have two questions
- Am I including it correctly in the tsconfig?
- How do I use this type definition in the JSX or other places?