Skip to content

Commit 98c0a4a

Browse files
authored
add /root to example path. PR491
1 parent 3a57aa3 commit 98c0a4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/handbook/Module Resolution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ TypeScript是模仿Node.js运行时的解析策略来在编译阶段定位模块
142142
回想一下Node.js先查找`moduleB.js`文件,然后是合适的`package.json`,再之后是`index.js`
143143

144144
类似地,非相对的导入会遵循Node.js的解析逻辑,首先查找文件,然后是合适的文件夹。
145-
因此`/src/moduleA.ts`文件里的`import { b } from "moduleB"`会以下面的查找顺序解析:
145+
因此`/root/src/moduleA.ts`文件里的`import { b } from "moduleB"`会以下面的查找顺序解析:
146146

147147
1. `/root/src/node_modules/moduleB.ts`
148148
2. `/root/src/node_modules/moduleB.tsx`

0 commit comments

Comments
 (0)