Hegel: delete doesn't count as turning a property to undefined

Created on 25 Apr 2020  路  5Comments  路  Source: JSMonk/hegel

function plus1(x) {
    return x + 1;
}
let y: { z: number } = {
    z: 5
};
delete y.z; // if you switch this line to y.z = undefined it will produce an error
let result = plus1(y.z);

This should return an error because type undefined is not compatible with type number

Also lovely work so far!

bug enhancement

All 5 comments

Oh, yes. Currently, we don't support delete. But it's should be supported. So, we will try to add support of the case. Thank you a lot for your contribution ^_^

Oh I see! Is there a list of currently unsupported features I can look at before reporting them since they are already known?

Unfortunately, there is no kind of list. So, if you will report it in issues, it will be great.

Fixed in 0.0.43 release. Thank you for the contribution ^_^.

Sweet! Thank you for the amazing work! 鉂わ笍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jarble picture jarble  路  4Comments

antonkatz picture antonkatz  路  3Comments

buttercubz picture buttercubz  路  5Comments

vkurchatkin picture vkurchatkin  路  5Comments

munizart picture munizart  路  3Comments