In my code, I want to import types for AutoGrid columnOptions.
import {ColumnOptions} from “@hilla/react-crud/autogrid-columns”;
but this gives error on IDE
TS2307: Cannot find module @hilla/react-crud/autogrid-columns or its corresponding type declarations.
If I click on the import, I can see the declarations. node modules have everything. One solution i found was change the typescript moduleResolution
to node
and then this error goes away.
Then if I import React then it shows error on that.
(I would not need to import React) since its already in the global scope. But just to remove IDE warning i tried that.
Is this the correct approach? Or am I missing something?