Artem Kobzar

Results 150 comments of Artem Kobzar

`new Array` is the same as `Array`.

For now, answer is No. Because inheritance can be only with one class (because of prototype). But for types (interfaces) we already have multiple inheritance. Thank you for the question...

For now, the answer is yes, or will inference it in the duration of the analysis of the package (if it doesn't contain any `d.ts`). But, we are developing compiler...

No problem. On the contrary, thank you for so many issues. Actually, I described it in detail [in docs](https://hegel.js.org/docs/array-types#getting-element-from-array) why do we need this behavior. Thank you for the issues...

Sounds good. I think we can implement a safe `Vector` type which will give you the ability to use the `Array` as a fixed-length collection (like `$Immutable`, but give you...

No. I talk about the next thing. ```typescript const vector: Vector = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; vector.pop(); // Error vector.length = 4 // Error...

It's a really interesting case. After I will fix it I will write an article about it. From one side, we can prevent extending a class with a new return/arguments...

I will think about it. I chose the name because some of the types make really magic things. For example, [$Throws](https://hegel.js.org/docs/magic-types#throwserrortype) changes actual function name. Or, es example, [$TypeOf](https://hegel.js.org/docs/magic-types#typeofvariable), which...

This is the goal "Don't have a runtime error". But, I actually don't understand the example, because, I run it and didn't get an error. Could you please explain the...

> Maybe `n && useNum(n)` would still have a type error, and we would need to write something like `n !== undefined && useNum(n)`. Not sure though. No, actually, if...