Property 'name' is missing in type
This results in error:
This can be resolved by using
type
:
Is this the intended usage, or a bug? Because I was expecting that type
would be implied within scope
5 Replies
I'm not seeing the error on my end 🤔
Ohhhhh
I do know why this is happening though it is fixed by an unreleased changed to allow overriding builtin keywords
What you're seeing is that
Error
doesn't know what to resolve to essentially since there is also a default Error
keyword representing the builtin class.
If you wrap it in type
, it just bypasses your scope and resolves to the builtinah makes sense
I will release this now
@SynthLuvr Also you can write number literals directly like in TS e.g. 500
The
==
just works for consistency with other comparisons since it is needed for length
E.g. if you wanted a 2-char string you'd want string==2
. number<2
is useful but number==2
is basically just so the same comparators ==, <=, >=, >, and <
work everywhereAh yes it works. I swear I tried doing that in the past but got errors. idk if I was imagining it or if a bug was fixed. But I'll use the literals now
Nah that has been stable since pre-alpha 😅
The static parser has barely seen any changes really over the last year since that was the focus of most of the initial dev effort and turned out well
(other than adding a few new features)