标签:pes var 必须 expr some require code asc port
https://www.tslang.cn/docs/handbook/declaration-files/library-structures.html
var fs = require("fs");
对于TypeScript或ES6,import关键字也具有相同的作用:
import fs = require("fs");
你通常会在模块化库的文档里看到如下说明:
var someLib = require(‘someLib‘);
或
define(..., [‘someLib‘], function(someLib) {
});
/// <reference types
指令:/// <reference types="moment" />
function getThing(): moment;
import * as someLib from ‘someLib‘;
不要使用/// <reference
指令去声明UMD库的依赖!
标签:pes var 必须 expr some require code asc port
原文地址:https://www.cnblogs.com/cag2050/p/9561846.html