我现在有一些空闲时间,决定看看 Angular 2 Quickstart
typings/angular2/angular2.d.ts
文件的内部 第 11 行
:
interface List<T> extends Array<T> {}
我知道这一行中发生了很多事情:
问题:
What is the difference between List and Array through the lens of javascript/ts?
When should I consider using Lists vs Arrays?
What would be an example of using a List vs an Array?
最佳答案
What is the difference between List and Array through the lens of javascript/ts?
没有。
When should I consider using Lists vs Arrays?
使用数组。 List 只是一个可选的命名(实际上是一个别名)。
What would be an example of using a List vs an Array?
一般只用Array
即可。
关于javascript - 从 angular v2.0.0.0-alpha.22.ts 内部理解第一行(列表与数组),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30313706/