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

Rename the _ExpectTypeOf type #106

Open
aryaemami59 opened this issue Aug 15, 2024 · 7 comments
Open

Rename the _ExpectTypeOf type #106

aryaemami59 opened this issue Aug 15, 2024 · 7 comments
Assignees
Labels
Breaking Change Contains breaking changes chore Does not impact code behavior

Comments

@aryaemami59
Copy link
Collaborator

If _ExpectTypeOf is going to be exported, we should probably rename it to something else to avoid confusion between _ExpectTypeOf and ExpectTypeOf.

@aryaemami59 aryaemami59 added chore Does not impact code behavior Breaking Change Contains breaking changes labels Aug 15, 2024
@aryaemami59 aryaemami59 added this to the 1.0.0 milestone Aug 15, 2024
@aryaemami59 aryaemami59 self-assigned this Aug 15, 2024
@mmkal
Copy link
Owner

mmkal commented Aug 20, 2024

Yeah, I don't remember the thinking behind PositiveExpectTypeOf and NegativeExpectTypeOf and ExpectTypeOf being named that way - they're not types for the expectTypeOf function, they're asserter-things. Maybe renaming them is a better option. We should check if vitest/anything else publicly on GitHub is using the current names though.

@aryaemami59
Copy link
Collaborator Author

Sounds good, I can look into it.

@aryaemami59
Copy link
Collaborator Author

@mmkal Vitest is using ExpectTypeOf here, I still think we should rename that one too, what do you think?

@mmkal
Copy link
Owner

mmkal commented Aug 21, 2024

Hmm vitest is exporting it which means god knows how many people are using it!

@aryaemami59
Copy link
Collaborator Author

Yeah that's unfortunate.

@aryaemami59
Copy link
Collaborator Author

I guess we can hold off on renaming ExpectTypeOf but we can probably go ahead with renaming _ExpectTypeOf, NegativeExpectTypeOf and PositiveExpectTypeOf. What do you think?

@mmkal
Copy link
Owner

mmkal commented Aug 23, 2024

I'm getting the heebie-jeebies. While the naming is not totally appropriate, it's basically consistent right now. I don't want to make it inconsistent.

I think the most I'd be comfortable with pre-v1 would be _ExpectTypeOf -> CreateExpectTypeOf or something. Not sure it's even worth it though to be honest. Maybe this should just be a v2 thing.

@mmkal mmkal removed this from the 1.0.0 milestone Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change Contains breaking changes chore Does not impact code behavior
Projects
None yet
Development

No branches or pull requests

2 participants