-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type 'N' cannot be used to index type 'NumberToString' with TS 2.5.2 when importing Ramda #234
Comments
Using |
Sounds like microsoft/TypeScript#15768, which I imagine should have made it in. Bit surprised, think @ikatyang had tried with |
I'm not sure why the error did not occur in the build, but I already have a fix for it in #233 though it'll cause TS 2.4 to error since the bug fix was in TS 2.5. I'll port them to master later. |
The definition from |
@ikatyang Thanks for the link, I was wondering why Ramda linked here rather than to DefinitelyTyped. |
@alshain: it's because the definitions over there aren't actively maintained (not to mention it's tougher to discuss issues without a distinct repo); it's been the intention to sync the types here back to there, but it hadn't happened yet so far. |
I'm having the same issue, is there any workaround available for the moment? |
It should be fixed in TS v2.5+, if you're talking about prior to v2.5, you have to add |
Thanks for the reply, I confirm it has been solved by updating TS to |
I'm on typescript
|
It shouldn't get errors with default config. Can you share some steps to reproduce? I'm not able to reproduce the issue, here's how I tested: mkdir ramda-test
cd ramda-test
yarn add types/npm-ramda#dist typescript --force
echo '{"compilerOptions": {"strict": true}}' > tsconfig.json
echo 'import * as R from "ramda"; R.view(R.lensIndex(0), [0, 1, 2]);' > test.ts
yarn tsc -p tsconfig.json |
According to the manual, I've installed the typings with
npm install --save-dev types/npm-ramda#dist
leads to the following error:
packge.json excerpt:
The text was updated successfully, but these errors were encountered: