@ccclass('类名') 会报警告,求正确的使用方式?

Cocos Creator 版本号:1.9.2

如题,使用TypeScript

这么使用时,会报错

@ccclass(‘Airplane’)
export default class Airplaneextends cc.Component {

}

错误信息:
Should not specify class name Airplane for Component which defines in project.

这么使用是为了可以通过 getComponent(‘Airplane’)获取相关的组件。
但是不知道为什么会出现上面的警告信息,不知道正确的使用方式是怎样?

getComponent(‘类名’)可以直接获取
@ccclass不用加 (‘类名’)

1赞