0

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

  1. Am I including it correctly in the tsconfig?
  2. How do I use this type definition in the JSX or other places?
jeff
  • 910
  • 2
  • 6
  • 25

0 Answers0