Skip to content

Comments

support object style#11

Closed
didierdemoniere wants to merge 1 commit intobdsqqq:mainfrom
didierdemoniere:main
Closed

support object style#11
didierdemoniere wants to merge 1 commit intobdsqqq:mainfrom
didierdemoniere:main

Conversation

@didierdemoniere
Copy link

No description provided.

@bdsqqq
Copy link
Owner

bdsqqq commented Mar 2, 2023

Thank you for the PR!

The implementation goes in a nice direction but there are a few issues:

  1. The test suite fails, I recommend running pnpm run test during development to catch any regressions as soon as they show up;
  2. Both the Tuple and Object returns are typesafe but as discussed in feat: add a method for returning an object #10, the autocomplete is a priority, but the proposed solution is suggesting many undesirable values.
    image

I'd suggest we close this and move the discussion to #10 to avoid duplication and improve the context of all involved. I'm studying solutions and the one suggested there has a small compromise I'm willing to make if we can't find a perfect fix.

Again, thank you so much for opening this!

@didierdemoniere
Copy link
Author

Data and error are in the wrong order, easy fix, but more importantly the only way I found to simulate a tuple is by extending a full fledge array and any attempt to alter the array type result in a type down of the tuple into a simple array-like.
I found no way around it.

@bdsqqq bdsqqq closed this Apr 4, 2023
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

Successfully merging this pull request may close these issues.

2 participants