Typescript and Ramda

问题描述 投票:0回答:2

我必须开始学习TypeScript,我想将其与Ramda结合使用。我有一个问题。 Ramda想使用占位符类型获得价值,但我想在我的函数中将自定义类型设置为ID。也许有人可以解决我的问题? enter image description here

javascript typescript typescript-typings ramda.js
2个回答
0
投票

Ramda对于打字稿不是很好,有时需要显式声明类型。

请参阅ts-fp。


0
投票

由于代理功能的此productId,我想您不能将数字类型用于type definitions。例如,您可以使用字符串,这是产品对象的键。

© www.soinside.com 2019 - 2024. All rights reserved.