String.Format
在 TypeScript
中不起作用。
错误:
> The property 'format' does not exist on value of type > '{ prototype: String; fromCharCode(...codes: number[]): string; > (value?: any): string; new(value?: any): String; }'. > > ``` * * *
attributes[“Title”] = String.format( Settings.labelKeyValuePhraseCollection[“[WAIT DAYS]”], originalAttributes.Days );
”`
原文由 Антон Степанов 发布,翻译遵循 CC BY-SA 4.0 许可协议
你可以很容易地自己 声明 它:
这是假设 String.format 在其他地方 定义 的。例如在 Microsoft Ajax 工具包中: http ://www.asp.net/ajaxlibrary/Reference.String-format-Function.ashx