DEV Community

Anjali Gurjar
Anjali Gurjar

Posted on

@ Use in Deno

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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay