Skip to content
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

Issues with upgrading from 0.28.25 to 0.29.1 when using yarn PnP #92

Open
nemanja-tosic opened this issue Jan 31, 2024 · 1 comment
Open

Comments

@nemanja-tosic
Copy link

nemanja-tosic commented Jan 31, 2024

We've recently upgraded from 0.28.25 to 0.29.1 and started having build issues along the lines of

error TS7006: Parameter 'user' implicitly has an 'any' type.

Coming from a function that looks like this (note: a lot of code has been redacted):

export const getUsers = curry(
  async (id: string): Promise<User[]> => {
    // ...
  }
);

// ...

import { getUsers } from '@package/getUsers.js';

// the user param is the one with an implicit any
await getUsers(id)).map(async user => {

As i was looking through the differences, i've noticed that 0.28.25 produces a d.ts which includes a triple slash import

/// <reference types="ts-toolbelt" />
...
getUsers: import("Function/Curry").Curry<(id: string) => Promise<User[]>>;

whereas 0.29.1 does not do that and produces something like below

getUsers: import("ts-toolbelt/out/Function/Curry.js").Curry<(id: string) => Promise<User[]>>;

Installing ts-toolbelt in the project resolves build issues.

@Harris-Miller
Copy link
Collaborator

I'm not really sure why 0.28.25 would have had that /// <reference types="ts-toolbelt" /> line in there. The second import seems correct, and ts-toolbelt is a direct dependency: https://github.com/ramda/types/blob/develop/package.json#L51. So it should always be there installed and able to be referenced.

I'm not familiar with yarn PnP at all either. But my gut tells me that the issue is with yarn and not types-ramda itself. I've never seen this issue myself in any npm or pnpm backed project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants