NodeModel's passed type argument doesn't evaluate correctly
abrman opened this issue · comments
Describe the bug
NodeModel's passed type argument doesn't evaluate correctly
To Reproduce
Create a .d.ts
file and set its' content to be
type NodeModel = import("@minoru/react-dnd-treeview").NodeModel;
type CustomNode = NodeModel<{
test: boolean;
}>;
Expected behavior
CustomNode should have a type declaration other than any
I think the reason is that the NodeModel
declared on line 14 is no longer generics.
If you write the following, you should get the intended type.
type NodeModel = import("@minoru/react-dnd-treeview").NodeModel<{ test: boolean }>;
I wasn't aware of that! Thank you!