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

No typesafety with module path aliases #227

Open
18anandn opened this issue Apr 28, 2024 · 0 comments
Open

No typesafety with module path aliases #227

18anandn opened this issue Apr 28, 2024 · 0 comments

Comments

@18anandn
Copy link

18anandn commented Apr 28, 2024

Importing scss modules using module path aliases does not give typesafety if type declarations are put in a seperate output folder.

// Works
import styles from "../styles/Home.module.scss";

// Does not work
import styles from "@/styles/Home.module.scss";

Expected Behavior

Type safety should be present when using module path aliases and type definitions are put in a seprate output folder.

Current Behavior

No typesafety when using module path aliases and type definitions are put in a seprate output folder.

Possible Solution

Maybe there is some tsconfig setting that I am missing.

Steps to Reproduce (for bugs)

Codesandbox link

Your Environment

Using Typescript Workspace version 5.4.5

  • Version used: latest as of now
  • Operating System and versions: Ubuntu 22.04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant