問題タブ [class-fields]

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 に答える
44 参照

javascript - javascriptクラス宣言からパブリックインスタンスクラスフィールドを反映する方法はありますか?

ecmascript 候補仕様では、次のようなクラス フィールドを宣言できます。

または次のような値の割り当てを使用します。

MDN のパブリック インスタンス フィールドの仕様

クラスメソッドを反映できるのと同様の方法で、クラス宣言から宣言されたフィールド名 (および割り当てられた値) のリストを反映する方法はありますか? :