Questions tagged «typescript1.6»

5
如何构造实用程序类
我有几个实用程序功能。将它们打包然后导入的最佳方法是什么? 这就是我想要做的: import * as util from './util' export class myClass{ constructor() { util.doSomething("test"); } } 然后在课堂上: export class Util{ doSomething(val: string){ return val;} doSomethingElse(val: string{ return val;} } 我从VS得到的错误消息是: Property doSomething does not exist on type util.
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.