【发布时间】:2019-08-18 14:42:02
【问题描述】:
So I asked this question earlier today on how to use paths.
现在我正在尝试使用这种方法转换 this project。
所以我先克隆它:
git clone git@github.com:fireflysemantics/validator.git
然后编辑paths 设置,使其看起来像这样:
"baseUrl": "./", /* Base directory to resolve non-absolute module names. */
"paths": {
"@fs": ["./src"],
"@test": ["./test"]
}, /*
然后我尝试编辑 src/container/error/index.ts 使其看起来像这样:
export { ObjectErrors } from "@fs/container/error/ObjectErrors";
export { ValidationError } from "./ValidationError";
当我编译 Typescript 时仍然会产生这个错误:
src/container/error/index.ts:1:30 - 错误 TS2307: 找不到模块 '@fs/container/error/ObjectErrors'。
1 从“@fs/container/error/ObjectErrors”导出 { ObjectErrors }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
想法?
Typescript Github 问题
【问题讨论】:
标签: javascript node.js angular typescript npm