Open RHxyz009abc opened 6 months ago
Certainly! Having different types in a tuple indeed showcases the unique capability of tuple types more effectively. However, including a string in Point2D
might seem unnatural, suggesting that a significant change to the example could be beneficial.
ja: たしかに!異なる型同士のほうが、タプル型らしさが出ますね。Point2D
がstringを持つのは不自然なので、例を大きく変える必要はありそうですね。
Features of TypeScript. Advanced type expression.
https://github.com/yytypescript/book/blob/93c3a5c342988a97274a1eea4d09ab8a6cdaf201/docs/overview/features.md?plain=1#L56
Wouldn't the following sample code be better? type Point2D = [number, string];