Closed sonygod closed 3 years ago
hmm, the type looks as correct as we can make it but the error seems to be more about haxe's more restrictive type system. I don't think there's much we can do here. Bet solution is to use cast here: Loader.loadRes('loadSpine/alien-ess', cast SkeletonData);
cocoscreator.d.ts
static loadRes(url: string, type: typeof cc.Asset): void;
to haxeand
when type
will throw this compile error