fix(tsc): 0 erreur TypeScript — toutes les 31 erreurs résolues
Types: - NoteType: 'daily' ajouté - PROPERTY_TYPES: 'relation' ajouté - SlashItem: isFavorite? ajouté - SuggestChartsResponse: error? ajouté Fixes propres: - import/route: Date | null → ?? undefined (3 occ) - notes/route: JSON.stringify sur checkItems/labels - user/export: b.title → b.seedIdea, Buffer → Uint8Array - study-plan: language column inexistante → défaut 'fr' - notebooks/[id]: parentId → parent connect/disconnect - brainstorm convert/finalize: async callback - next.config: @ts-expect-error inutile supprimé - ai-settings: revalidateTag(tag, 'default') Casts (TipTap/Prisma, safe at runtime): - tiptap-chart/math extensions: InputRule/options as any - chat/route: system messages as any - note-graph-view: ForceGraph2D as any - property-value-editor: relation comparison - sanitize-content: TrustedHTML cast
This commit is contained in:
@@ -160,7 +160,7 @@ export async function POST(req: NextRequest) {
|
||||
links: n.links ?? undefined,
|
||||
trashedAt: parseDate(n.trashedAt),
|
||||
notebookId: n.notebookId ?? null,
|
||||
contentUpdatedAt: parseDate(n.contentUpdatedAt),
|
||||
contentUpdatedAt: parseDate(n.contentUpdatedAt) ?? undefined,
|
||||
updatedAt: new Date(),
|
||||
labelRelations: {
|
||||
set: validLabelIds.map(id => ({ id })),
|
||||
@@ -187,7 +187,7 @@ export async function POST(req: NextRequest) {
|
||||
userId,
|
||||
createdAt: parseDate(n.createdAt) ?? new Date(),
|
||||
updatedAt: parseDate(n.updatedAt) ?? new Date(),
|
||||
contentUpdatedAt: parseDate(n.contentUpdatedAt),
|
||||
contentUpdatedAt: parseDate(n.contentUpdatedAt) ?? undefined,
|
||||
labelRelations: {
|
||||
connect: validLabelIds.map(id => ({ id })),
|
||||
},
|
||||
@@ -211,7 +211,7 @@ export async function POST(req: NextRequest) {
|
||||
userId,
|
||||
createdAt: parseDate(n.createdAt) ?? new Date(),
|
||||
updatedAt: parseDate(n.updatedAt) ?? new Date(),
|
||||
contentUpdatedAt: parseDate(n.contentUpdatedAt),
|
||||
contentUpdatedAt: parseDate(n.contentUpdatedAt) ?? undefined,
|
||||
},
|
||||
})
|
||||
stats.notes++
|
||||
|
||||
Reference in New Issue
Block a user