Arrays work the same in TypeScript as they do in Javascript, the only difference being that we have to define their type upfront. Arrays, by their nature, are an ordered list of data. Defining an s type can be confusing at first, so let's look at how it works. Array Defining Array Types in TypeScript If we have an array, we can define its type in TypeScript by using the notation . For example, the below variable is expected to be an of . type[] arrayType array strings let arrayType:string[] = [ 'hello', 'there' ] Similarly, an array of numbers could be defined like this: let myNumbers:number[] = [ 1, 2, 3, 4 ]; This also conforms any future array items to that type. For example, we couldn't push or add a to the end of an array defined as type : string number let myNumbers:number[] = [ 1, 2, 3, 4 ]; // Throws an error. myNumbers.push("string"); Tuple Types in TypeScript , but they are a type of array with a defined number of items, of specified types. For example, we could define an array with two elements, of type , and , and this would be called a . That could be achieved by doing something like this: I've already written about tuples in TypeScript here string number tuple let myTuple:[ string, number ] = [ "hello", 20 ]; Tuples can be of any length. Storing a Mixture of Types in an Array in TypeScript Sometimes, we know an array is going to consist of either or elements, but we're not sure in what order, or even how many. As such, a isn't really the right option here. Instead, we can define an array like this using the same format as before, only letting TypeScript know that it can be multiple types. number string tuple For example, for an array of unknown lengths where any item could be either a or a , we could write the following: number string let type:(string | number)[] = [ 'hello', 'world', 20, 40, 'goodbye' ]; Using the Generic Type format for Arrays in TypeScript Finally, it is also possible to use the generic type definition format for defining types in TypeScript. For example, an of numbers could be defined like so: Array Array let type:Array<number> = [ 0, 1, 2, 3, 4, 5 ] Or, an array where items could be either a or a could be defined like so: string number let type:Array<string | number> = [ 'hello', 'world', 20, 40, 'goodbye' ]; Conclusion Understanding the array type in TypeScript is fundamental for using TypeScript day to day. I hope you've enjoyed this guide. Also published . here