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-types-esm: Model.createBindingContext returns Context|undefined #335

Open
nlunets opened this issue Feb 3, 2022 · 0 comments
Open

ts-types-esm: Model.createBindingContext returns Context|undefined #335

nlunets opened this issue Feb 3, 2022 · 0 comments

Comments

@nlunets
Copy link
Member

nlunets commented Feb 3, 2022

This is not so much a jsdoc error as a weird / stupid behavior (imo)

createBindingContext can apparently return in some case undefined (technically null based on the implementation) however when writing code this will never happen except when you do some weird thing.

It implies that resolve returns undefined (which btw is not in the signature) which would only happen if you have a relative binding without a parent context defined...

So ok it could happen but you'd be really looking for trouble writing such code :)
I wonder if it really makes sense to return undefined at all or if you should have an unresolveable context of some kind in there somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants