TypeStat icon indicating copy to clipboard operation
TypeStat copied to clipboard

🐛 Bug: Using file-level changes and suppressTypeErrors together does not work

Open rubiesonthesky opened this issue 10 months ago • 0 comments

Bug Report Checklist

  • [X] I have tried restarting my IDE and the issue persists.
  • [X] I have pulled the latest main branch of the repository.
  • [X] I have searched for related issues and found none that matched my issue.

Expected

When using these options together, they should work.

/* Above file */
(function () {
	let text: string | number;
	text = 1;
})();

Actual

Additional comments added with below or above, are not added to file.

(function () {
	let text: string | number;
	text = 1;
})();

Additional Info

Enabled suppressTypeErrors on all tests inside test/cases/files -> All test outputs are missing the comments that were supposed to be added.

For example, typestat.json

{
	"cleanups": {
		"suppressTypeErrors": true
	},
	"files": {
		"above": "/* Above file */"
	},
	"fixes": {
		"incompleteTypes": true
	}
}

rubiesonthesky avatar Apr 07 '24 18:04 rubiesonthesky