@types/jsurl/index.d.ts' is not a module.
npm i jsurl 安装错误,
因为 typescript无法用此方法安装,卸载干净。
1. 增加types目录
新建jsurl.d.ts文件,写入:
declare module 'jsurl' {
type Nullable<T> = T | null | undefined;
export function stringify(input: any): string;
export function parse(input?: Nullable<string>): Nullable<any>;
}
2)重新运行,成功!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)