我正在研究TypeScript和C#中的代码规范,并且我们已经制定了一个规则,即在C#中使用string.Empty
代替""
。
C#示例:
doAction("");
doAction(string.Empty); // we chose to use this as a convention.
TypeScript:
// only way to do it that I know of.
doAction("");
现在我的问题是,是否有办法在TypeScript中保持此规则的一致性,还是说这是语言特定的?
你们中有没有指示如何在TypeScript中定义空字符串的指针?