Typescript-string-constructor

提供:Dev Guides
移動先:案内検索

TypeScript-文字列コンストラクタープロパティ

オブジェクトを作成したString関数への参照を返します。

var str = new String( "This is string" );
console.log("str.constructor is:" + str.constructor)

コンパイル時に、JavaScriptで同じコードが生成されます。

その出力は次のとおりです-

str.constructor is:function String() { [native code] }