Skip to content

Feature request - Make a parameter required for callback function #20274

@ORESoftware

Description

@ORESoftware

This video shows the problem:

https://www.useloom.com/share/1a0f1e84083049ff8f745a3a1f17ac03

basically I have this

v.run =  t => { return t.foo()};

run(() => {   
    //  this compiles
});

run(t => {   
    //  but I want to make the t parameter required!
});

the "plain" function satisfies the typings, but I want to make the parameter required, not optional. I can't really explain but it should be clear from the (rambling) video. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions