Custom Component as property in Typescript

Custom Component as property in Typescript
0

In js, we can define class properties as custom components, such as
var CustomComponent = require(“CustomComponent”);

properties: {
test: {
default: null,
type: CustomComponent
}
}

How can we achieve the same in Typescript? I want to show it in IDE so I can drag components from other node to it

I just do this:

@property(CustomComponent)
custom: CustomComponent = null;

Works fine for me, but I’m not exactly sure what you mean by this:

so I can drag components from other node to it

You have to drag and drop a node that has that component.