Skip to content

Error if type node uses inaccessible type in isolated declarations #58620

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

Merged

Conversation

dragomirtitian
Copy link
Contributor

Fixes #58558

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label May 22, 2024
type Z = string;
return {} as Z;
~
!!! error TS9038: Type containing private name 'Z' can't be used with --isolatedDeclarations.
Copy link
Member

Choose a reason for hiding this comment

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

Q: Is there a reason this shouldn't get a "annotate this function return" related span?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should. I'll add it

@weswigham weswigham merged commit 8537bb7 into microsoft:main May 22, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Isolated declarations allows return types that reference local expr or type
3 participants