Skip to content
This repository was archived by the owner on Jan 1, 2025. It is now read-only.

@recoiljs/refine's types export Path while the library itself doesn't #1950

Closed
brncsk opened this issue Aug 12, 2022 · 1 comment
Closed
Assignees
Labels

Comments

@brncsk
Copy link

brncsk commented Aug 12, 2022

I use refine's Path class for my zod ↔ refine adapter (see #1833).

As of 0.1.0, the TS types of @recoiljs/refine seem to indicate that Path is exported, however it is not:

import { Path } from '@recoiljs/refine';

console.log(Path); // → undefined

Please either export Path or remove it from the type declarations – either is fine by me as I was already mocking it in the library. Thanks, folks!

brncsk added a commit to brncsk/zod-refine that referenced this issue Aug 12, 2022
@recoiljs/refine does not seem to actually export Path, see: facebookexperimental/Recoil#1950
@drarmstr drarmstr added the Component: refine related to refine label Aug 13, 2022
@drarmstr
Copy link
Contributor

Path is currently exported as a type, but not the actual class implementation. I think we want to continue exporting the type so it can be used in custom checker implementations. @bsouthga, what are your thoughts on exporting the actual class?

@drarmstr drarmstr self-assigned this Aug 16, 2022
drarmstr added a commit to drarmstr/Recoil that referenced this issue Aug 16, 2022
Summary:
Resolves facebookexperimental#1950

Refine previously exported the `Path` type, but now actually export the `Path` class for custom checkers.

Differential Revision: D38753941

fbshipit-source-id: decdfca6f670704237a19afd671d303266386760
drarmstr added a commit to drarmstr/Recoil that referenced this issue Aug 16, 2022
Summary:
Refine 0.1.1 release:

- Remove reference to `native` directory in `package.json` to cleanup errors for `react-native` (facebookexperimental#1931)
- Export Path class for custom checkers (facebookexperimental#1950, facebookexperimental#1956)

Reviewed By: bsouthga

Differential Revision: D38764896

fbshipit-source-id: f8d6c35fc5c92c285182586e3b725d03c65bcf59
drarmstr added a commit to drarmstr/Recoil that referenced this issue Aug 17, 2022
Summary:
Pull Request resolved: facebookexperimental#1959

Refine 0.1.1 release:

- Remove reference to `native` directory in `package.json` to cleanup errors for `react-native` (facebookexperimental#1931)
- Export Path class for custom checkers (facebookexperimental#1950, facebookexperimental#1956)

Reviewed By: bsouthga

Differential Revision: D38764896

fbshipit-source-id: dedf75327d5b4103f92ab421240704f73786e742
facebook-github-bot pushed a commit that referenced this issue Aug 18, 2022
Summary:
Pull Request resolved: #1959

Refine 0.1.1 release:

- Rename `boolean()` export to `bool()` since `boolean` is a reserved word (#1922, #1962)
- Remove reference to `native` directory in `package.json` to cleanup errors for `react-native`. (#1931)
- Export `Path` class for custom checkers. (#1950, #1956)
- Extend the failure message of `union()` and `or()` with each type. (#1961)

Reviewed By: bsouthga

Differential Revision: D38764896

fbshipit-source-id: 5eb0327ab9034f3f0802796d986fd6e7df28f05c
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants