haxeui / haxeui-core

The core library of the HaxeUI framework
http://haxeui.org
MIT License
345 stars 71 forks source link

proper type for the Toolkit.init() parameter #203

Closed sh-dave closed 6 years ago

sh-dave commented 6 years ago

Current Behavior

Everytime i see the completion for Toolkit.init(), i die a little inside.

Media

image

Possible Solution

Use the same principle that basically drives all the backend code (e.g. ComponentBase) and implement a proper ToolkitOptions type defined in the backends. So if you take the html5 backend as an example it would be defined in haxeui/haxeui-html5

typedef ToolkitOptions = {
    container: js.html.Element,
}

In kha it would currently be just empty

typedef ToolkitOptions = {
}
ibilon commented 6 years ago

@MSGhero I've left the implementation of this for haxeui-flixel to you ;)

ibilon commented 6 years ago

Works now.