@vtex/npm-ramda
TypeScript icon, indicating that this package has built-in type declarations

0.23.0-RC1 • Public • Published

##Type definitions for Ramda

Build Status ![Gitter](https://badges.gitter.im/Join Chat.svg)

Testing:

# old way, easy
npm test
# without npm
./node_modules/typescript/bin/tsc --lib \"es2015\" --module commonjs test.ts --noEmit
# diffing, more detailed, with npm
npm run diff
# without
ts-node typecheck.ts test.ts 2>&1 | tee typecheck.txt

Pull requests are welcome!

##Usage

Install the typings for node using:

npm install @types/ramda --saveDev

If you use the package through a script tag, use:

npm install @types/ramda --saveDev --global

##Note on placeholders Due to incompatiblity problems with typescript's typing system, Ramda's placeholder typing is removed. For binary functions the same functionally can be achieved using R.flip. For example:

// using a placeholder ...
R.subtract(*placeholder*, 3);
// ... is the same as
R.flip(R.subtract)(3);

In Ramda almost all functions are curried. TypeScript does not natively support currying, so in cases where we've omitted a combination this might break. Example of a potential gap:

R.insert(2, 'x', [1,2,3,4])
R.insert(2)('x', [1,2,3,4])
R.insert(2, 'x')([1,2,3,4])
R.insert(2)('x')([1,2,3,4]) // => type error!

##Status Typing compatible with ramda version 0.22.1.

##Testing

  • unix: npm test
  • windows: tsc --lib es2015 --module commonjs test.ts --noEmit

##Todo

  • compose: use like extend rather than forcing types to be the same?
  • Curry?
  • issue: allow separating manual/inferred generics to allow providing hints to e.g. pipe/compose

/@vtex/npm-ramda/

    Package Sidebar

    Install

    npm i @vtex/npm-ramda

    Weekly Downloads

    1

    Version

    0.23.0-RC1

    License

    none

    Last publish

    Collaborators

    • natalia_godot
    • daher
    • tiagonapoli
    • r-araripe
    • bivillar
    • rafabac
    • augusto.lazaro
    • nonsequitur
    • tergol
    • rafarubim
    • analuizamtg
    • gustavorosolem
    • igorframos
    • arthurepc
    • rogerlucena
    • kaisermann
    • jeymisson
    • marcosvcp
    • victorhmp
    • lurian
    • marcoskwkm
    • lucasecdb
    • thiagomurakami
    • vcalasans
    • jgfidelis
    • ericreis
    • andreldsa
    • diegoximenes
    • salesfelipe
    • athoscouto
    • lbebber
    • alcar
    • tlgimenes
    • arturpimentel
    • felippenardi
    • alinevillaca
    • anitavincent
    • caio.oliveira
    • victorges
    • brunojdo
    • vtexlab
    • breno
    • firstdoit
    • augustob
    • afonsopraca
    • amoreira
    • guigs
    • guilhermebruzzi
    • brunohq
    • nandoacoelho
    • kevinchevallier
    • cmdalbem
    • iago
    • ntmedina