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

Fix type test generation issues #22989

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

CraigMacomber
Copy link
Contributor

Description

generic types with an extends clause of never currently generate type tests which do not compile due to any not extending never. This is fixed by using never instead of any.

@system types which do not promise user facing stability are now omitted from type testing.

The currently unused tags to opt into alternative type testing for a given type have been converted from - separated to camel case since it seems - does not work well in tags.

Reviewer Guidance

The review process is outlined on this wiki page.

@github-actions github-actions bot added area: build Build related issues base: main PRs targeted against main branch labels Nov 5, 2024
@@ -44,16 +44,19 @@ export function toTypeString(
// does the type take generics that don't have defaults?
// eslint-disable-next-line unicorn/no-lonely-if -- logic is clearer when grouped this way.
if (
node.getTypeParameters().length > 0 &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this check is redundant with the one following it so it was removed.

@CraigMacomber CraigMacomber merged commit 468164d into microsoft:main Nov 5, 2024
30 checks passed
Josmithr pushed a commit that referenced this pull request Nov 5, 2024
## Description

generic types with an extends clause of `never` currently generate type
tests which do not compile due to any not extending never. This is fixed
by using `never` instead of `any`.

`@system` types which do not promise user facing stability are now
omitted from type testing.

The currently unused tags to opt into alternative type testing for a
given type have been converted from `-` separated to camel case since it
seems `-` does not work well in tags.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants