Did they add a runtime List<> and/or Map<> type class to typepad 1.0? And if not, is there a solid library out there someone wrote that provides this functionality?

And in the case of List<>, is there a linked list where the elements in the list have the next/prev property? We need a list where from an element object (ie not from an iterator), we can get the next and previous elements in the list (or null if it's the first/last one).

推荐答案

Did they add a runtime List<> and/or Map<> type class to typepad 1.0

不,提供运行时不是TypeScript团队的重点.

有没有一个可靠的库可以提供这种功能?

我写道(实际上只是把桶移植到typescript):https://github.com/basarat/typescript-collections

Update

JavaScript/TypeScript现在本机支持这一点,如果需要,可以使用lib.d.ts:https://basarat.gitbooks.io/typescript/docs/types/lib.d.ts.html和polyfill来启用它们?

Typescript相关问答推荐

发出与HTML多姆事件重叠的Angular事件

推断类型

为什么在将条件返回类型的字符串赋给数字时没有类型错误?

ReturnType此索引方法与点表示法之间的差异

为什么缩小封闭内部不适用于属性对象,但适用于声明的变量?

APP_INITIALIZER—TypeError:appInits不是函数

类型安全JSON解析

编剧错误:正在等待Expect(Locator).toBeVisible()

为什么在这个例子中,我把缺少的属性添加到对象中时,TypeScrip没有拾取,如何修复?

如何使用类型谓词将类型限制为不可赋值的类型?

TypeScrip中的类型安全包装类

通过泛型函数本身推断受约束的泛型参数的类型脚本问题

try 呈现应用程序获取-错误:动作必须是普通对象.使用自定义中间件进行MySQL操作

如何将对象数组中的键映射到另一种对象类型的键?

在组件卸载时try 使用useEffect清除状态时发生冲突.react +打字

如何连接属性名称和值?

Angular NG8001错误.组件只能在一个页面上工作,而不是在她的页面上工作

映射类型不是数组类型

是否使用类型将方法动态添加到类?

基于可选参数的动态类型泛型类型