Skip to content

TypeScript

Extend the base configuration in your tsconfig.json:

{
"extends": "@presencelearning/frontend-config/typescript",
"compilerOptions": {
"paths": {
"@root/*": ["./*"],
"@app/*": ["src/app/*"],
"@common/*": ["src/app/common/*"],
"@modules/*": ["src/app/modules/*"],
"@environments/*": ["src/environments/*"],
"@ts/*": ["src/types/*"]
}
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

The subpath is /typescript, not /tsconfig.json. Because the package declares an exports map, exports-aware resolution rejects the file path outright.

  • Angular 18 compatible (ES2022, decorators)
  • Strict mode enabled
  • Optimized for the Angular compiler
  • Path mappings for clean imports

The base config also sets:

  • strictTemplates: true
  • strictInjectionParameters: true
  • strictInputAccessModifiers: true
  • enableI18nLegacyMessageIdFormat: false

strictTemplates in particular means template type errors — a wrong input name, a nullable binding — fail the build rather than surfacing at runtime.

The shipped config is Angular 18 shaped: "module": "ES2020", "moduleResolution": "node", useDefineForClassFields: false. Angular 19 and later expect "moduleResolution": "bundler", and "node" resolution ignores package exports maps — which affects any dependency that ships subpath exports. Override those two options locally when consuming from an Angular 19+ app.