I am attempting to use Ramda.js as follows:
/// <reference path="../../../node_modules/@types/ramda/index.d.ts" />
module App {
var settab = R.once((element) => current(element));
function current(li: any) {
// ...
}
}
I get error, Cannot find name 'R'
In the case of the ramda/index.d.ts
file, the declaration (with detail omitted) is as follows:
declare var R: R.Static;
declare namespace R {
type Ord = number | string | boolean;
interface Static {
// .........
}
}
export = R;
You have to import it using the
import
statement:Also, you don't have to use
/// <reference />
anymore, just donpm install --save @types/ramda
.