我已经使用npm在我的Typescript项目中安装了navigo和@types/navigo。new Navigo(null, true, "#!"); TS2686: 'Navigo' refers to a UMD global, but the current file is a module.使用此类型定义的
在Node中,在导入时运行函数是一种常见的模式,例如require("debug")("debug:namespace")。在TS中有办法做到这一点吗?还是有一个优雅的替代品?在debug示例中,我导入的包如下:import * as debugInitalizer from "debug",然后声明const debug = debugInitializer("debug:是否有一种更优雅的