microsoft / microsoft/TypeScript
Much better comment preservation
Open
Nobody has claimed this yet.
Needs Investigation
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
some comments are removed (even even removeComments to false)
TypeScript Version: Version 3.9.1-rc
Search Terms:
Much better comment preservation
Code
// my comment 1
import { something } from './somefile.js';
// my comment 2
declare let test1: something;
let test = new something( {} );
// also
let item = [
// my comment 3
{ a: 0 },
{ a: 0 },
{ a: 0 },
// my comment 4
];
**Expected behavior:**
// my comment 1
import { something } from './somefile.js';
// my comment 2
let test = new something( {} );
// also
let item = [
// my comment 3
{ a: 0 },
{ a: 0 },
{ a: 0 },
// my comment 4
];
Actual behavior:
// my comment 1
import { something }from '/lib/backend/./somefile.js';
let test = new something({});
// also
let item = [
// my comment 3
{ a: 0 },
{ a: 0 },
{ a: 0 },
];
Related Issues:
sound like previous bugs report but not.
#1665
#16727
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TypeScript reproduction in the issue and compare its emitted JavaScript with the expected output, focusing on the comments that disappear. Done means the relevant comments are preserved while the shown import and formatting behavior remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100