refactor: enhance type safety by replacing any types with stricter types across the codebase, improving error handling and reducing potential bugs
This commit is contained in:
21
types/iso-3166-2.d.ts
vendored
Normal file
21
types/iso-3166-2.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
declare module 'iso-3166-2' {
|
||||
interface SubdivisionInfo {
|
||||
name: string
|
||||
type: string
|
||||
parent?: string
|
||||
}
|
||||
|
||||
interface CountryInfo {
|
||||
name: string
|
||||
sub: Record<string, SubdivisionInfo>
|
||||
}
|
||||
|
||||
const iso3166: {
|
||||
data: Record<string, CountryInfo>
|
||||
country(code: string): CountryInfo | undefined
|
||||
subdivision(code: string): SubdivisionInfo | undefined
|
||||
codes: string[]
|
||||
}
|
||||
|
||||
export default iso3166
|
||||
}
|
||||
9
types/jspdf-autotable.d.ts
vendored
Normal file
9
types/jspdf-autotable.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import 'jspdf'
|
||||
|
||||
declare module 'jspdf' {
|
||||
interface jsPDF {
|
||||
lastAutoTable: {
|
||||
finalY: number
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user