cocos-engine
cocos-engine copied to clipboard
deprecate node.on(type: string) and use node.on(type: NodeEventType) instead
I've tried deprecated like this
but it seems the ts language service cannot distinguash the enum and string type,
I guess it is because the NodeEventType enum value is string
enum NodeEventType {
MOUSE_DOWN = 'mouse-down'
}
we should support compile cc.d.ts to
enum NodeEventType {
MOUSE_DOWN
}
so that the ts can distinguash the enum and string type, and this is what we expect