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

chore: fix Brittle type definitions #383

Merged
merged 2 commits into from
Nov 23, 2023
Merged

chore: fix Brittle type definitions #383

merged 2 commits into from
Nov 23, 2023

Conversation

achou11
Copy link
Member

@achou11 achou11 commented Nov 21, 2023

Noticed issues with the definitions for t.exception and all of the ones that are coercible

@achou11 achou11 requested a review from gmaclennan November 21, 2023 16:34
@gmaclennan
Copy link
Member

Sorry I've read through this twice now and can't spot the types that have changed, could you explain it to me?

@achou11
Copy link
Member Author

achou11 commented Nov 23, 2023

Sorry I've read through this twice now and can't spot the types that have changed, could you explain it to me?

yeah it's fixing t.exception.all() and the ones where you can use .coercively() e.g. t.is.coercively(). the syntax used in the current implementation (i.e. the string keys) does not properly represent this interface. for example, right now ts won't complain if you do t['exception.all'](...) but it doesn't work in brittle when trying to run the test, since you can't access a nested key with this syntax

@gmaclennan
Copy link
Member

Ah thanks completely missed that! Makes sense now

@gmaclennan gmaclennan merged commit 46c0c52 into main Nov 23, 2023
7 checks passed
@gmaclennan gmaclennan deleted the ac/brittle-types branch November 23, 2023 02:56
gmaclennan added a commit that referenced this pull request Nov 23, 2023
* main:
  chore: fix Brittle type definitions (#383)
  feat: dbMigrationPathOpt - add db migration path to `MapeoProject` and `MapeoManager` (#384)
  [OPTIC-RELEASE-AUTOMATION] release/v9.0.0-alpha.2 (#382)
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