tbuglc
tbuglc

Reputation: 390

Types definitions are not available in .test.ts file

I can pretty well use my types in .ts but for some reason, I don't understand why It's failing on .test.ts though both files exist under the same folder.

In .ts file 👇

enter image description here

In .test.ts file 👇

enter image description here

enter image description here

Upvotes: 0

Views: 297

Answers (1)

tbuglc
tbuglc

Reputation: 390

In case someone else is facing this same issue, Just exclude "src/**/*.test.ts" in "exclude": ["node_modules", "src/**/*.test.ts"] in your tsconfig.json

Upvotes: 1

Related Questions