在我的程序中,我试图获取一系列项目(在本例中是房间),通过一些属性(超过10个座位的房间)对其进行过滤,将它们分组成可以存储在字典中的组(按房间所在的区域分组),然后按字典的键进行排序。
为此,我使用以下代码
import { ascend, filter, groupBy, pipe, sort } from "ramda";
class Room {
// Number of seats in the room
public seats!: number;
// Area on site, an area can have many r
const obj = {
psets: [...],
type: {
psets: [...]
}
}
想要连接psets道具。两者都可能不存在。
R.concat(R.pathOr([], ['type','pSets']), R.propOr([], 'pSets'));
**
Uncaught TypeError: function n(r){return 0===arguments.length||w(r)?n:t.apply(this,arguments)} does not have a method named