Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filename with two dollar signs ($$) behaves differently when using paths config #61538

Open
its-jman opened this issue Apr 5, 2025 · 0 comments
Assignees
Labels
Needs Investigation This issue needs a team member to investigate its status.

Comments

@its-jman
Copy link

its-jman commented Apr 5, 2025

πŸ”Ž 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

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Investigation This issue needs a team member to investigate its status.
Projects
None yet
Development

No branches or pull requests

3 participants