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

LDEventName type does not allow for "change:<flag-name>" #122

Closed
rmanalan opened this issue Nov 9, 2018 · 2 comments
Closed

LDEventName type does not allow for "change:<flag-name>" #122

rmanalan opened this issue Nov 9, 2018 · 2 comments

Comments

@rmanalan
Copy link

rmanalan commented Nov 9, 2018

https://github.com/launchdarkly/js-client/blob/556711701d74d7c4a50981cae0547ec78f3d5eec/typings.d.ts#L24

Because the LDEventName ts type is defined as 'ready' | 'change', you can't use this syntax for ldclient.on():

ldclient.on('change:<flag-name', cb);
@eli-darkly
Copy link
Contributor

Thanks for catching that - we should have a fix out shortly (probably by just changing that parameter to "string" and documenting the events for on). There are a couple other event names that we forgot to include there too.

@eli-darkly
Copy link
Contributor

OK, version 2.7.3 is out now with a fix for this. Sorry about the error.

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