Skip to content

Fix for dts emit for tripple slash directives in d.ts files #1519

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 3 commits into from
Aug 5, 2025

Conversation

sheetalkamat
Copy link
Member

@sheetalkamat sheetalkamat commented Aug 5, 2025

Discovered while adding tests to #1484

@Copilot Copilot AI review requested due to automatic review settings August 5, 2025 16:18
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes triple slash directive emission in TypeScript declaration (.d.ts) files by ensuring these directives are properly included in the emitted output. The fix ensures that references like /// <reference path="..." />, /// <reference types="..." />, and /// <reference lib="..." /> are correctly emitted in declaration files.

  • Adds emission of triple slash directives to declaration files
  • Updates test baselines to reflect the corrected behavior
  • Fixes missing preserve attribute handling in directive emission

Reviewed Changes

Copilot reviewed 71 out of 71 changed files in this pull request and generated 1 comment.

File Description
internal/printer/printer.go Implements triple slash directive emission for declaration files with new helper functions
testdata/baselines/reference/submodule/* Updates test baselines to reflect corrected triple slash directive emission across multiple test cases

@sheetalkamat sheetalkamat added this pull request to the merge queue Aug 5, 2025
Merged via the queue into main with commit 16953b7 Aug 5, 2025
22 checks passed
@sheetalkamat sheetalkamat deleted the dtsEmitReferences branch August 5, 2025 17:21
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