Array type notation: T[] vs. Array<T> in TypeScript

In this blog post, we explore two equivalent notations for Arrays in TypeScript: T[] and Array<T>. I prefer the latter and will explain why.


This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer

In this blog post, we explore two equivalent notations for Arrays in TypeScript: T[] and Array<T>. I prefer the latter and will explain why.


This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer


Print Share Comment Cite Upload Translate Updates
APA

Dr. Axel Rauschmayer | Sciencx (2025-02-17T00:00:00+00:00) Array type notation: T[] vs. Array<T> in TypeScript. Retrieved from https://www.scien.cx/2025/02/17/array-type-notation-t-vs-arrayt-in-typescript/

MLA
" » Array type notation: T[] vs. Array<T> in TypeScript." Dr. Axel Rauschmayer | Sciencx - Monday February 17, 2025, https://www.scien.cx/2025/02/17/array-type-notation-t-vs-arrayt-in-typescript/
HARVARD
Dr. Axel Rauschmayer | Sciencx Monday February 17, 2025 » Array type notation: T[] vs. Array<T> in TypeScript., viewed ,<https://www.scien.cx/2025/02/17/array-type-notation-t-vs-arrayt-in-typescript/>
VANCOUVER
Dr. Axel Rauschmayer | Sciencx - » Array type notation: T[] vs. Array<T> in TypeScript. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/02/17/array-type-notation-t-vs-arrayt-in-typescript/
CHICAGO
" » Array type notation: T[] vs. Array<T> in TypeScript." Dr. Axel Rauschmayer | Sciencx - Accessed . https://www.scien.cx/2025/02/17/array-type-notation-t-vs-arrayt-in-typescript/
IEEE
" » Array type notation: T[] vs. Array<T> in TypeScript." Dr. Axel Rauschmayer | Sciencx [Online]. Available: https://www.scien.cx/2025/02/17/array-type-notation-t-vs-arrayt-in-typescript/. [Accessed: ]
rf:citation
» Array type notation: T[] vs. Array<T> in TypeScript | Dr. Axel Rauschmayer | Sciencx | https://www.scien.cx/2025/02/17/array-type-notation-t-vs-arrayt-in-typescript/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.