microsoft / microsoft/TypeScript
Filename with two dollar signs ($$) behaves differently when using paths config
未关闭
@andrewbranch 已经在做这个了。
开始于 2025年4月9日。
Needs Investigation
- 主要语言
- Go
- 星标
- 111k
- 派生
- 14.3k
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 132
描述
🔎 Search Terms
"dollar signs", "two dollar signs", "$$", "paths config"
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about (nothing relevant found in FAQ)
⏯ Playground Link
https://github.com/its-jman/ts-dollar-import-repro
💻 Code
// The files: "code", "$code", and "$$code" all exist. "$$$$code" does not.
// However, the first line is the only one that has an error:
// "'"~server/$$code"' has no exported member named 'test2'. Did you mean 'test1'?"
import {test2 as test2_error} from "~server/$$code"
import {test2 as test2_working} from "~server/$$$$code"
import {test1} from "~server/$code"
import {test0} from "~server/code"
import {test2 as test2_2} from "./server/$$code"
import {test1 as test1_2} from "./server/$code"
import {test0 as test0_2} from "./server/code"
🙁 Actual behavior
It appears that $$ gets escaped / interpreted as reduced to a single $ but ONLY when using paths config.
🙂 Expected behavior
The filename imported matches the filename that you've written.
Additional information about the issue
Suggested cause / solution mentioned in responses on TS Discord here: https://discord.com/channels/508357248330760243/1357697438990995488/1357697438990995488
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。