typed-typings / npm-ramda

TypeScript's type definitions for Ramda
MIT License
384 stars 64 forks source link

mapObjIndexed can't apply the Record type #417

Open tomzaku opened 5 years ago

tomzaku commented 5 years ago
const a = {
    more: {
        b: 1, 
        c: 2
    }
}
const x = {
    more: {
        y: 1, 
        z: 2
    }
}

interface Params<T> {
    more: T
}
const combineAx = <T extends Record<string, Params<any>>>(types: T) => {
    const uT =  mapObjIndexed((item) => item.more, types) //Throw err at here
    return uT
}

combineAx({a,x})

Version: "@types/ramda": "types/npm-ramda#dist",

"typescript": "^3.1.2",