chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase
This commit is contained in:
parent
970e08c466
commit
1f7e365a4e
237 changed files with 1951 additions and 49413 deletions
|
|
@ -176,7 +176,9 @@ export class SmartPDFImporter {
|
|||
minParagraphLength: 50,
|
||||
extractFromTables: true,
|
||||
groupBy: 'document' as const,
|
||||
onProgress: () => {},
|
||||
// Annotated with the full callback signature so the merged opts type has
|
||||
// a single callable shape (the no-op default narrowed the union).
|
||||
onProgress: (() => {}) as NonNullable<SmartPDFOptions['onProgress']>,
|
||||
...options
|
||||
}
|
||||
|
||||
|
|
@ -274,7 +276,7 @@ export class SmartPDFImporter {
|
|||
throughput: Math.round(sectionsPerSecond * 10) / 10,
|
||||
eta: Math.round(estimatedTimeRemaining),
|
||||
phase: 'extracting'
|
||||
} as any)
|
||||
})
|
||||
}
|
||||
|
||||
const pagesProcessed = new Set(data.map(d => d._page)).size
|
||||
|
|
@ -338,7 +340,7 @@ export class SmartPDFImporter {
|
|||
* Process a single section
|
||||
*/
|
||||
private async processSection(
|
||||
group: { id: string, type: string, items: Array<Record<string, any>> },
|
||||
group: { id: string, type: 'page' | 'paragraph' | 'table', items: Array<Record<string, any>> },
|
||||
options: SmartPDFOptions,
|
||||
stats: SmartPDFResult['stats'],
|
||||
entityMap: Map<string, string>
|
||||
|
|
@ -444,7 +446,7 @@ export class SmartPDFImporter {
|
|||
|
||||
return {
|
||||
sectionId: group.id,
|
||||
sectionType: group.type as any,
|
||||
sectionType: group.type,
|
||||
entities,
|
||||
relationships,
|
||||
concepts,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue