タプルconst exampleTuple1: [string, number] = ['hello', 10]; // OK const exampleTuple2: [string, number] = ['hello', 10, 'world']; // エラー const exampleTuple3: [string, number] = ['hello', 10, 'world', 20]; // エラー const exampleTuple4: [string, number] = ['hello']; // エラー |
|