- createApiClient() factory with baseUrl, getToken, defaultHeaders
- fetch() method that throws on error
- safeFetch() method that returns { data, error } tuple (never throws)
- Auto-injects Authorization header from getToken callback
- Replaces duplicated apiFetch patterns in 3 dashboards
11 lines
202 B
JSON
11 lines
202 B
JSON
{
|
|
"extends": "../../tsconfig.base.json",
|
|
"compilerOptions": {
|
|
"outDir": "dist",
|
|
"rootDir": "src",
|
|
"lib": ["ES2022", "DOM"]
|
|
},
|
|
"include": ["src"],
|
|
"exclude": ["src/**/*.test.ts"]
|
|
}
|