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

Member functions can be marked optional #13

Open
stheophil opened this issue Sep 17, 2020 · 0 comments
Open

Member functions can be marked optional #13

stheophil opened this issue Sep 17, 2020 · 0 comments

Comments

@stheophil
Copy link
Contributor

See SJsClass ctor and look for // TODO: Support optional member functions

interface Test {
    method?(a: number) : string;
}

Implementation should check for existence of 'method' property, call it if it exists, return undefined otherwise. Return value is de facto string | undefined

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