Using @ as an alias for a custom path is a common practice in modern JavaScript/TypeScript projects to simplify imports and improve readability. Instead of using long relative paths (e.g., ../../core/someModule), you can define @ (or another symbol) as an alias for a specific directory, like the core folder. Here's how it works and how to implement it:
example import { clients } from "@/client/client.schema.ts";
put this in json file
"imports": {
"@/": "./core/"
}
then use it.
Top comments (0)