问题描述
我正在尝试在我的 Angular 应用程序中使用 simple-crypto-js 库,但是在通过 npm 安装包时我......我遇到了 Typescript 错误 - 无法使用命名空间“WordArray”作为一种类型。
以下是版本详情:
- 角 7
- 打字稿 3.2
- Simple-crypto-js 2.3
任何帮助或指导将不胜感激。谢谢!
错误信息:
[16:35:54] typescript: node_modules/simple-crypto-js/build/SimpleCrypto.d.ts,line: 8
Cannot use namespace 'WordArray' as a type.
L7: constructor(secret: string);
L8: static generaterandom(length?: number,expectsWordArray?: boolean): string | WordArray;
L9: encrypt(data: object | string | number | boolean): string;
[16:35:54] 打字稿:node_modules/simple-crypto-js/build/SimpleCrypto.d.ts,第 10 行 不能使用命名空间“编码器”作为类型。
L9: encrypt(data: object | string | number | boolean): string;
L10: decrypt(ciphered: string,expectsObject?: boolean,encoder?: Encoder): string | object;
L11: encryptObject(object: object): string;
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)