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:
@@ -72,7 +72,7 @@ const MathEquationView = ({ node, updateAttributes, deleteNode, selected }: any)
|
||||
|
||||
const insertSymbol = (symbol: string) => {
|
||||
const el = inputRef.current
|
||||
if (!el) { setInput(prev => prev + symbol); return }
|
||||
if (!el) { setInput((prev: string) => prev + symbol); return }
|
||||
const start = el.selectionStart
|
||||
const end = el.selectionEnd
|
||||
const newVal = input.slice(0, start) + symbol + input.slice(end)
|
||||
@@ -286,14 +286,14 @@ export const MathEquationExtension = Node.create({
|
||||
return [
|
||||
{
|
||||
find: /\$\$([^$]+)\$\$$/,
|
||||
handler: ({ state, range, match }) => {
|
||||
handler: ({ state, range, match }: any) => {
|
||||
const latex = match[1]
|
||||
const tr = state.tr
|
||||
tr.deleteRange(range.from, range.to)
|
||||
tr.insert(range.from, state.schema.nodes.mathEquationBlock.create({ latex }))
|
||||
},
|
||||
},
|
||||
]
|
||||
] as any
|
||||
},
|
||||
})
|
||||
|
||||
@@ -338,7 +338,7 @@ export const InlineMathExtension = Node.create({
|
||||
return [
|
||||
{
|
||||
find: /(?:^|\s)\$([^$\n]+)\$$/,
|
||||
handler: ({ state, range, match }) => {
|
||||
handler: ({ state, range, match }: any) => {
|
||||
const fullMatch = match[0]
|
||||
const latex = match[1]
|
||||
const leadingSpace = fullMatch.startsWith(' ') ? ' ' : ''
|
||||
@@ -352,7 +352,7 @@ export const InlineMathExtension = Node.create({
|
||||
])
|
||||
},
|
||||
},
|
||||
]
|
||||
] as any
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user