diff --git a/docs/TECH_DEBT.md b/docs/TECH_DEBT.md index 7a6cfd3..4768adb 100644 --- a/docs/TECH_DEBT.md +++ b/docs/TECH_DEBT.md @@ -100,7 +100,7 @@ ### TD-14 — Erreurs TypeScript TS2835 pré-existantes **Priorité :** 🟡 Important -**Statut :** Ouvert +**Statut :** Résolu — session correction build TypeScript **Description :** Erreurs TS2835 sur plusieurs fichiers de routes. Non bloquant (tests verts) mais à corriger. Gate de qualité actuel : npm run test. @@ -161,3 +161,4 @@ Gate de qualité actuel : npm run test. |---|---|---|---| | TD-02 | planController.ts complété | 2026-04-16 | Session Stripe | | TD-03 | stripe.ts complété | 2026-04-16 | Session Stripe | +| TD-14 | Erreurs TS2835 + TS18046 + TS7053 corrigées | 2026-04-17 | Session build Render | diff --git a/src/lib/deepseek.ts b/src/lib/deepseek.ts index 322a6f2..fb2b319 100644 --- a/src/lib/deepseek.ts +++ b/src/lib/deepseek.ts @@ -87,7 +87,9 @@ export async function correctEE(contenu: string, tache: string): Promise, next: Next) => { const profile = c.get('profile') - let perms: ReturnType + const plan = profile.plan as Plan try { - perms = getPlanPermissions(profile.plan as 'free' | 'standard' | 'premium') + getPlanPermissions(plan) } catch { return c.json( { @@ -26,7 +26,7 @@ export function planMiddleware(feature: Feature) { ) } - if (!perms[feature]) { + if (!checkFeatureAccess(plan, feature)) { return c.json( { error: true, diff --git a/tsconfig.json b/tsconfig.json index c83c533..391bfec 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "target": "ES2022", - "module": "NodeNext", - "moduleResolution": "NodeNext", + "module": "ESNext", + "moduleResolution": "Bundler", "lib": ["ES2022"], "outDir": "./dist", "rootDir": "./src", @@ -16,5 +16,5 @@ "sourceMap": true }, "include": ["src/**/*"], - "exclude": ["node_modules", "dist"] + "exclude": ["node_modules", "dist", "src/**/__tests__/**", "**/*.test.ts"] }