Join GitHub today
Misleading English message for error TS1046 #21251
TypeScript Version: 2.0.10 (checked; message is the same on master branch)
The following test.d.ts file:
when compiled, yields the following error message:
This is both misleading and just wrong, as the following test.d.ts file is legal:
The error message should not be misleading.
The error message is misleading. This led me on a wild goose chase trying to get my .d.ts file to compile, all the time using the apparently required
First we need a new message text proposal.
For the change itself, all messages are stored in https://github.com/Microsoft/TypeScript/blob/master/src/compiler/diagnosticMessages.json, you will need to change it and change the reference site to it in https://raw.githubusercontent.com/Microsoft/TypeScript/master/src/compiler/checker.ts (search for