Skip to content

Conversation

AndreasArvidsson
Copy link
Member

Checklist

  • [/] I have added tests
  • [/] I have updated the docs and cheatsheet
  • [/] I have not broken the cheatsheet

@AndreasArvidsson AndreasArvidsson requested a review from a team as a code owner November 19, 2024 13:44
Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

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

looks good subject to minor comments

}

create(
tryCreate(
Copy link
Member

Choose a reason for hiding this comment

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

I believe we usually use maybe for things like this, eg maybeCreate

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

}
}

create(
Copy link
Member

Choose a reason for hiding this comment

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

I would be tempted to call this createStrict or createOrThrow. Once we've migrated all scopes, this will never throw, right? So maybe we just leave it 🤷‍♂️

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes this shouldn't really throw. It's just there because I don't like doing ! assertion in typescript if we can get around it.

@AndreasArvidsson AndreasArvidsson added this pull request to the merge queue Dec 12, 2024
Merged via the queue into main with commit 84d803e Dec 12, 2024
15 checks passed
@AndreasArvidsson AndreasArvidsson deleted the assertScopeCreation branch December 12, 2024 19:14
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