These are chat archives for ramda/ramda

24th
Mar 2018
Dennie de Lange
@tkvw
Mar 24 2018 12:01
is there a ramda alternative to lodash get ?
James Forbes
@JAForbes
Mar 24 2018 12:03
R.prop and R.path
Dennie de Lange
@tkvw
Mar 24 2018 12:30
ah, I need to split first
Risto Novik
@riston
Mar 24 2018 12:59
Hello, any TypeScript users here?
import { pluck } from 'ramda';

type User = {
  name: string;
  age: number;
}

const persons: User[] = [
  { name: 'dsadsa', age: 21},
  { name: 'a', age: 4},
];

const names = pluck<string>('name', persons);
console.log(persons, names);
unable to get the correct type with pluck
Risto Novik
@riston
Mar 24 2018 13:05
alternative way: const names = map((x: User) => prop('name', x), persons);
seems like the TS and ramda combination doesn't work very well any alternatives?