Skip to content
New issue

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

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

Already on GitHub? # to your account

improve type-safety #31

Closed
wants to merge 1 commit into from
Closed

improve type-safety #31

wants to merge 1 commit into from

Conversation

boozook
Copy link
Contributor

@boozook boozook commented May 27, 2016

For test & example:

function add<T:I, I>(component:T, componentClass:Class<I> = null)
{
    add("");
    add("", String);
    add({x:42});
    add([42], Array);
    add(new ash.signals.Signal0(), ash.signals.SignalBase);
    add(new haxe.io.StringInput(""), haxe.io.StringInput);
    add(new haxe.io.StringInput(""), haxe.io.BytesInput);
    add(new haxe.io.StringInput(""), haxe.io.Input);

    // next exps isnt valid:
    add(42, String);
    add(new ash.signals.Signal0(), ash.signals.Signal1);
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant