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

ts: update OnChange signature #174

Closed
RyKilleen opened this issue Oct 24, 2022 · 3 comments
Closed

ts: update OnChange signature #174

RyKilleen opened this issue Oct 24, 2022 · 3 comments

Comments

@RyKilleen
Copy link

The OnChange function currently has the below signature, where OnChangeStatus is any. It should likely be changed as follows:

- declare type OnChange = ((content: Content, previousContent: Content, OnChangeStatus: any) => void) | null;
+ declare type OnChange = ((content: Content, previousContent: Content, OnChangeStatus: OnChangeStatus) => void) | null;
@josdejong
Copy link
Owner

ahh, that explains the earlier confusion!

The cause is an implicit any, see c2d626f. The reason TypeScript didn't complain about this issue is that I haven't yet configured strict: true in the TypeScript configuration. Doing that gives a lot of typing issues right now, it requires some time to fix all of those. It is on the to-do list though.

@josdejong
Copy link
Owner

Fixed now in v0.9.0

@RyKilleen
Copy link
Author

Thanks so much!

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