Reputation: 531
I want to add code just temporary and remove it before I do commit. How to create user defined warning in typescript so compiler (or build server) will let me know that this code is still there. I don't want to forget about it. In C# there is #warning, is there something similar in TypeScript?
Example:
foo(){
// #warning: remove next line before commit, it is just for develop purposes
return true;
return someLogic(); // just this line should be there
}
Upvotes: 0
Views: 353
Reputation: 30889
Since type errors don't block code generation, you can write a dummy line of code that produces a type error, for example:
let a: "remove me before commit" = "";
Upvotes: 2