5
Typescript:文字列と文字列の違い
TypeScriptの文字列と文字列の違いを知っている人はいますか?それらが同じであるべきだと仮定するのは正しいですか? var a: String = "test"; var b: string = "another test"; a = b; b = a; // this gives a compiler error! コンパイラの現在のバージョンは言う: Type 'String' is not assignable to type 'string'. 'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible. それはバグですか?
256
typescript