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

feat: Add support for callback signatures #11

Open
diosney opened this issue Jan 15, 2019 · 4 comments
Open

feat: Add support for callback signatures #11

diosney opened this issue Jan 15, 2019 · 4 comments

Comments

@diosney
Copy link

diosney commented Jan 15, 2019

Something like:

export interface IHookOnCancel {
  (): void | Promise<void | null>;
}
@dsagal dsagal changed the title feat: Add support for function parameters feat: Add support for call signatures Jan 15, 2019
@dsagal
Copy link
Member

dsagal commented Jan 15, 2019

Could you include an example of where it would be useful? In particular, it would help decide how to support such signatures, or if we only need to be able to skip them.

@diosney
Copy link
Author

diosney commented Jan 15, 2019

All the issues I recently created are useful to me righth now on a single feat I need, namely client configuration validation, I mean, validate the configuration that my library users enter.

After some though and testing, I came to realization that maybe using these libraries is not the way to go in my case, but using something like JSON Schema or some other schema validator.

Thanks

@dsagal
Copy link
Member

dsagal commented Jan 15, 2019

Perhaps you are right. But that's why I am asking. Call signatures don't make sense for a data descriptor of the kind that you might consider using JSON Schema validator for.

@diosney diosney changed the title feat: Add support for call signatures feat: Add support for callback signatures Jan 15, 2019
@diosney
Copy link
Author

diosney commented Jan 15, 2019

@dsagal You're right, JSON Schema doesn't have callback signatures, I said it only to say something as an example, which I have to check now how can I overcome that or to find another way to fully validate client configuration entries.

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

2 participants