These are chat archives for ramda/ramda

17th
Jan 2019
Rand231
@Rand231
Jan 17 10:36
Hi how can i program in a chromebook?
im a starter i want to learn some stuff
i only have a chromebook is there any programs that i can use for programming in a chromebook?
Miguel Dorta
@ellipticaldoor
Jan 17 20:19
Hi, I think a found a problem with assoc and typescript
interface Test {
  a: number
}
const test:Test = { a: 1}
const test2:Test = { ...test, a: "string"}
const test3:Test = assoc('a', 'string', test)
test2 gives an error because a has to be a number
but with test3 typescript doesn't complains and sets the value of a to a string
I'm doing something wrong?
Brad Compton (he/him)
@Bradcomp
Jan 17 20:39

@ellipticaldoor The Ramda team doesn't maintain the typescript typings, but some of us are somewhat familiar with TS. One issue is that the functions Ramda provides often cannot be correctly typed in TS because it's not powerful enough to represent the types of the functions.

Do you know what the type provided for assoc looks like? If you want to share it I can take a look at why it might be failing?

Miguel Dorta
@ellipticaldoor
Jan 17 21:26
I found a library called remeda
const obj = { a: { b: 1}}
const res = set(obj.a, 'b', 2)
with this one I have type security
though is data-first
Brad Compton (he/him)
@Bradcomp
Jan 17 21:36
Cool! I hadn't heard of remeda, but it's good to have libraries focused on TS directly