Three fixes to the parts of the template that contradicted its own "illegal states unrepresentable" claim: - tsconfig: turn on strict + strictTemplates (measured zero fallout — the codebase already typechecked cleanly, it just wasn't enforced). - RemoteData<T> drops its unused error type parameter (Resource.error is always Error) and Failure now carries a real Error. Pages read the union with @let instead of re-deriving from the resource, which deletes the non-null assertion strictNullChecks would otherwise flag. - users.adapter.ts never checked response.ok, so an HTTP error resolved as a garbage Success and crashed instead of reaching RemoteData's Failure branch. New shared/infrastructure/http.ts adds the status check plus hand-written parse guards and abortSignal forwarding; the six fetch stubs across the test suite (which encoded the missing check) and adapter spec now cover the Failure and Empty paths. Also adds real routing (@angular/router was a dependency with zero imports and a fake "Back" button): /users and /users/:id are now deep-linkable via withComponentInputBinding(), tested with RouterTestingHarness driving real navigation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
40 lines
1.1 KiB
JSON
40 lines
1.1 KiB
JSON
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
{
|
|
"compileOnSave": false,
|
|
"compilerOptions": {
|
|
"strict": true,
|
|
"noImplicitOverride": true,
|
|
"noPropertyAccessFromIndexSignature": true,
|
|
"noImplicitReturns": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"skipLibCheck": true,
|
|
"isolatedModules": true,
|
|
"experimentalDecorators": true,
|
|
"importHelpers": true,
|
|
"target": "ES2022",
|
|
"module": "preserve",
|
|
"ignoreDeprecations": "6.0",
|
|
"baseUrl": ".",
|
|
"paths": {
|
|
"@shared/*": ["src/app/shared/*"],
|
|
"@users/*": ["src/app/users/*"]
|
|
}
|
|
},
|
|
"angularCompilerOptions": {
|
|
"strictTemplates": true,
|
|
"enableI18nLegacyMessageIdFormat": false,
|
|
"strictInjectionParameters": true,
|
|
"strictInputAccessModifiers": true
|
|
},
|
|
"files": [],
|
|
"references": [
|
|
{
|
|
"path": "./tsconfig.app.json"
|
|
},
|
|
{
|
|
"path": "./tsconfig.spec.json"
|
|
}
|
|
]
|
|
}
|