Skip to content

Remove lib.d.ts line info in inlay hint baselines #55426

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
merged 1 commit into from
Aug 22, 2023

Conversation

MariaSolOs
Copy link
Contributor

Had some issues in #55141 because of including line information from lib.d.ts files, so this PR attempts to make those baselines more robust.

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Aug 17, 2023
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@MariaSolOs MariaSolOs requested a review from jakebailey August 17, 2023 23:22
@jakebailey
Copy link
Member

No test change; is this because your other PR is what introduces them? Was hoping to see an example that shows it working but otherwise it's probably fine.

if (hint.displayParts) {
hint.displayParts = ts.map(hint.displayParts, part => {
if (part.file && /lib(?:.*)\.d\.ts$/.test(part.file)) {
part.span!.start = -1;
Copy link
Member

Choose a reason for hiding this comment

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

span is definitely defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. If the file is defined, the span definitely is.

@MariaSolOs
Copy link
Contributor Author

No test change; is this because your other PR is what introduces them? Was hoping to see an example that shows it working but otherwise it's probably fine.

Yep. My type hints PR will have the changes. I already tried cherry picking this locally and it worked.

@MariaSolOs MariaSolOs merged commit 507fd31 into microsoft:main Aug 22, 2023
@MariaSolOs MariaSolOs deleted the lib-inlay-hint-baselines branch August 22, 2023 18:14
snovader pushed a commit to EG-A-S/TypeScript that referenced this pull request Sep 23, 2023
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.

3 participants