Skip to content

Support optional parameters #308

@XDracam

Description

@XDracam
[Hub]
public interface IExampleHub {
    public Task DoSomething(int optional = 3);
    public Task DoSomething2(string? optional = null);
}

This hub currently generates:

export type IExampleHub = {
    doSomething(optional: number): Promise<void>;
    doSomething2(optional: string): Promise<void>;
}

Which is awkward, because now I have to provide parameters that are entirely unnecessary in the backend API.

Please add support for optional parameters in hub methods. Or, if you wish and can give me entry points, I can work on a PR as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions