We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Express.JS application using express-file-routing for file-based routing.
express-file-routing
├── index.ts └── src/ ├── services/ ├── controllers/ │ └── health.controller.ts ├── middlewares/ ├── interfaces/ └── routes/ └── health.ts
tsconfig.json
"paths": { "@controllers/*": ["src/controllers/*.controller"], "@services/*": ["src/services/*.service"], "@middlewares/*": ["src/middlewares/*.middleware"], "@interfaces/*": ["src/interfaces/*.interface"] },
Suppose I have the following file
import {checkHealth} from '@controllers/health'; import type {Handler} from 'express'; export const get: Handler = async (request, response) => { response.json({status: checkHealth()}); };
TypeScript will output the following
import { checkHealth } from '@controllers/health'; export const get = async (request, response) => { response.json({ status: checkHealth() }); };
tsc-alias should be able to resolve correctly
tsc-alias
tsc-alias doesn't resolve
Remove any suffix from path aliases and it will work correctly.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
Express.JS application using
express-file-routing
for file-based routing.Directory structure
tsconfig.json
What doesn't work?
Suppose I have the following file
TypeScript will output the following
Expected behaviour
tsc-alias
should be able to resolve correctlyResults
tsc-alias
doesn't resolveWorkaround
Remove any suffix from path aliases and it will work correctly.
The text was updated successfully, but these errors were encountered: