Microsoft/TypeScript

Clarity about the what path references are relative to

Open

#50,529 建立於 2022年8月29日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)TypeScript (6,726 fork)batch import
DocsHelp Wanted

倉庫指標

Star
 (48,455 star)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 9 個 PR)

描述

Suggestion

🔍 Search Terms

references path relative

✅ Viability Checklist

My suggestion meets these guidelines:

  • [ x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • [x ] This wouldn't change the runtime behavior of existing JavaScript code
  • [ x] This could be implemented without emitting different JS based on the types of the expressions
  • [x ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • [x ] This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

Both https://www.typescriptlang.org/tsconfig#references and https://www.typescriptlang.org/docs/handbook/project-references.html aren't specific about what the string in path is relative to (the current tsconfig, the current working directory, rootDir, etc)

💻 Use Cases

I'm writing some build scripts around invocations of tsc with a lot of linking, aliasing, etc and I don't want to put absolute paths in the generated tsconfig files

貢獻者指南