問題タブ [value-class]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
19 参照

javascript - 値クラス / TypeScript の厳密な型付け

Scalaで行われているように、TypeScriptで厳密な型の値クラスを定義することは可能ですか?

タイプ エイリアスは、TypeScript の「コンパイラ」によって無視されるようです。

Scala では、値クラスを使用できます (厳密な型指定に加えて、より多くの利点があります)。