@@ -10,14 +10,16 @@ export type Callback<T = string[]> = (
1010 info ?: Info ,
1111) => void ;
1212
13- export interface Parser extends stream . Transform { }
13+ // export interface Parser extends stream.Transform {}
1414
15- export class Parser {
15+ // export class Parser<T> extends stream.Transform {
16+ export class Parser extends stream . Transform {
1617 constructor ( options : Options ) ;
1718
18- __push ( line : any ) : any ;
19+ // __push(line: T): CsvError | undefined;
20+ __push ( line : any ) : CsvError | undefined ;
1921
20- __write ( chars : any , end : any , callback : any ) : any ;
22+ // __write(chars: any, end: any, callback: any): any;
2123
2224 readonly options : OptionsNormalized ;
2325
@@ -68,7 +70,10 @@ export interface CastingContext {
6870 readonly invalid_field_length : number ;
6971}
7072
71- export type CastingFunction = ( value : string , context : CastingContext ) => any ;
73+ export type CastingFunction = (
74+ value : string ,
75+ context : CastingContext ,
76+ ) => unknown ;
7277
7378export type CastingDateFunction = (
7479 value : string ,
@@ -464,7 +469,7 @@ export class CsvError extends Error {
464469 code : CsvErrorCode ,
465470 message : string | string [ ] ,
466471 options ?: OptionsNormalized ,
467- ...contexts : any [ ]
472+ ...contexts : unknown [ ]
468473 ) ;
469474}
470475
0 commit comments