-
Notifications
You must be signed in to change notification settings - Fork 3
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
Complains about "object is possibly 'undefined'" when it should not #50
Comments
Third example: public arr?: readonly string[]; {{#each this.arr as |value index|}}
{{/each}} Again complains about the possibility |
Likely it should be an warning, not error |
this errors now warnings (4.0.6) |
@lifeart - thanks for all the quick fixes and changes! However, in this case, I disagree with what you've done. As I mentioned in my first post, HBS' handling of |
Also, the third example I gave still errs - |
@boris-petrov I'm getting your points accroding to handlebars |
conversation: https://discord.com/channels/480462759797063690/484421406659182603/808348456045379584 as I get: |
@boris-petrov could you check |
@lifeart - I think this version broke a bunch of other things: public get columns(): readonly string[] {
return [];
}
@action
public onClick(): void {
} {{#each this.columns as |column|}}
{{/each}}
<button type="button" {{on "click" this.onClick}}>
</button> These give the following two errors:
|
ya, that’s I’m talking about, both issue could be fixed as typing updates, but it will produce less maintainable and checkable code, looks like we need to refigure out how to handle it |
@boris-petrov for now I'm rolling back changes in |
This leads to:
Which is kind of useless - HBS supports getting properties on undefined objects - that's a feature, not a bug.
There is another case worth mentioning:
The first line should be fine but the second one should err if possible.
The text was updated successfully, but these errors were encountered: