- property少了default
//修改前
export function property(options?: { type?: any; url?: typeof cc.RawAsset; visible?: boolean | (() => boolean); displayName?: string; tooltip?: string; multiline?: boolean; readonly?: boolean; min?: number; max?: number; step?: number; range?: number[]; slide?: boolean; serializable?: boolean; editorOnly?: boolean; override?: boolean; animatable?: boolean } | any[] | Function | cc.ValueType | number | string | boolean): Function;
// 修改后
export function property(options?: { default?: any; type?: any; url?: typeof cc.RawAsset; visible?: boolean | (() => boolean); displayName?: string; tooltip?: string; multiline?: boolean; readonly?: boolean; min?: number; max?: number; step?: number; range?: number[]; slide?: boolean; serializable?: boolean; editorOnly?: boolean; override?: boolean; animatable?: boolean } | any[] | Function | cc.ValueType | number | string | boolean): Function;
2.Sprite下静态枚举有问题
//修改前
export module Sprite {
/** !#en Enum for sprite type.
!#zh Sprite 类型 */
export enum SpriteType {
SIMPLE = 0,
SLICED = 0,
TILED = 0,
FILLED = 0,
}
}
// 修改后
export module Sprite {
/** !#en Enum for sprite type.
!#zh Sprite 类型 */
export enum Type {
SIMPLE = 0,
SLICED = 0,
TILED = 0,
FILLED = 0,
}
}
3.VideoPlayer,EditBox等等类似的组件中 destroy():void 而 component中 destroy():boolean 导致 ts中getComponent报错,没有代码提示