by DanRosenwasser on 6/26/20, 5:01 PM with 17 comments
by eloff on 6/26/20, 5:49 PM
I'm most excited about: TypeScript 4.0 supports a promising proposal to add three new assignment operators: &&=, ||=, and ??=.
Which is a nice shortcut for operators I use often.
No huge changes here that I can see, just small steady improvements to an already excellent language.
by nammi on 6/26/20, 5:59 PM
https://github.com/microsoft/TypeScript/issues/38568 https://github.com/microsoft/TypeScript/pull/32264
by mpawelski on 6/26/20, 9:54 PM
I love when such "old" feature request is finally added to Typescript. First proposal for it was almost 5 years ago [1]. It really gives hope for other long standing and heavily upvoded feature requests that maybe we'll get them one day :)
by tengbretson on 6/26/20, 6:25 PM
by seph-reed on 6/26/20, 6:29 PM
Not sure I like this. Can definitely imagine the following being a realistic scenario, and see no reason to disallow it:
class Base {
public num = 42;
}
class Child extends Base {
protected _num = 42;
// no longer allowed in 4.0
public get num() { return this._num; }
public set num(newVal) {
alert(`new num ${newVal}`);
this._num = newVal
}
}
Did I misunderstand something?by nojvek on 6/26/20, 6:39 PM
We use ts-loader with webpack in transpileOnly mode and a separate tsc invocation for typechecking that runs as a linter i.e noEmit
by jondubois on 6/26/20, 7:07 PM