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

New types for HAL resource #65

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

New types for HAL resource #65

wants to merge 2 commits into from

Conversation

marcialfps
Copy link
Contributor

Description

Since other teams are adopting Typescript in their UIs, we need the hook useHalResource to return a correctly typed array.

Changes

  • Added new types based on Halstack React HAL and Halstack Client libraries.
  • Updated useHalResource with the new types.

New needed types are added to improve integration with typescript
Update useHalResource hook with the new types
@marcialfps marcialfps added the enhancement New feature or request label Jan 22, 2024
@marcialfps marcialfps self-assigned this Jan 22, 2024
@@ -24,12 +24,101 @@ export type UseHalResource = {

export type RequestStatus = "idle" | "fetching" | "resolved" | "rejected" | "interaction";

type InteractionType = Record<string, unknown> & {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @marcialfps , We believe it would be better to move everything from line 27 to 109 to a separate Halstack -client types library.

Also will investigate how to contribute to the public npm or @types and push all the types we are exporting from Halstack libraries, including hasltack-react-hal and even the halstack-react-cdk.

We will start and spike to learn more about @types and agree on the best approach moving forward. I would keep this PR on Hold for the time being if that's ok with you.

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

Successfully merging this pull request may close these issues.

2 participants