NodeModel's passed type argument doesn't evaluate correctly
abrman opened this issue · 2 comments
abrman commented
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
minop1205 commented
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 }>;
abrman commented
I wasn't aware of that! Thank you!