Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type of Function error. #84

Open
sonygod opened this issue Feb 2, 2021 · 0 comments
Open

type of Function error. #84

sonygod opened this issue Feb 2, 2021 · 0 comments

Comments

@sonygod
Copy link

sonygod commented Feb 2, 2021

from cocoscreator .ts

{
requireComponent?: Function
}

convert to haxe

var requireComponent : haxe.Constraints.Function

when I convert from js

{

 requireComponent: dragonBones.ArmatureDisplay;
}

to haxe

{
 requireComponent =global.dragonbones.ArmatureDisplay;//Class<global.dragonbones.ArmatureDisplay> should be Null<haxe.Function>
}

Cc.hx

static function Class(?options:{ @:optional var name : String; @:optional @:native("extends") var extends_ : haxe.Constraints.Function; @:optional var ctor : haxe.Constraints.Function; @:optional var __ctor__ : haxe.Constraints.Function; @:optional var properties : Dynamic; @:optional var statics : Dynamic; @:optional var mixins : Array<haxe.Constraints.Function>; @:optional var editor : { @:optional var executeInEditMode : Bool; @:optional var requireComponent : haxe.Constraints.Function; @:optional var menu : String; @:optional var executionOrder : Float; @:optional var disallowMultiple : Bool; @:optional var playOnFocus : Bool; @:optional var inspector : String; @:optional var icon : String; @:optional var help : String; }; @:optional var update : haxe.Constraints.Function; @:optional var lateUpdate : haxe.Constraints.Function; @:optional var onLoad : haxe.Constraints.Function; @:optional var start : haxe.Constraints.Function; @:optional var onEnable : haxe.Constraints.Function; @:optional var onDisable : haxe.Constraints.Function; @:optional var onDestroy : haxe.Constraints.Function; @:optional var onFocusInEditor : haxe.Constraints.Function; @:optional var onLostFocusInEditor : haxe.Constraints.Function; @:optional var resetInEditor : haxe.Constraints.Function; @:optional var onRestore : haxe.Constraints.Function; @:optional var _getLocalBounds : haxe.Constraints.Function; }):haxe.Constraints.Function;
	/**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant