-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Labels
bugSomething isn't working correctlySomething isn't working correctlytscrelated to the TypeScript tsc compilerrelated to the TypeScript tsc compiler
Description
Version: Deno 2.1.1
In my deno.json
, I have compilerOptions
and imports
defined like so:
{
"compilerOptions": {
"types": ["@testing-library/jest-dom"]
},
"imports": {
"@testing-library/jest-dom": "npm:@testing-library/jest-dom@^6.6.3",
}
}
And I run deno check
to check the entire source with a path to the json file like so: deno check --config ./deno.json ./src/
.
But when I run that, it gives me all the errors I expect to be resolved by the types
option:
(These are functions extended by Testing Library. In Node they would be fixed through tsconfig.json)
TS2339 [ERROR]: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
expect(getByText(/diagnostic/i)).toBeInTheDocument();
~~~~~~~~~~~~~~~~~
And, more importantly, it goes away when I add this at the top of the file:
// @ts-types="@testing-library/jest-dom"
Or
// @deno-types="@testing-library/jest-dom"
Shouldn't deno check
be able to do this automatically through the deno.json
file?
However it seems to ignore the reference type directives as well:
/// <reference types="@testing-library/jest-dom" />
or
/// <reference types="@testing-library/jest-dom/types/matchers.d.ts" />
kuchta
Metadata
Metadata
Assignees
Labels
bugSomething isn't working correctlySomething isn't working correctlytscrelated to the TypeScript tsc compilerrelated to the TypeScript tsc compiler