Skip to content

Commit

Permalink
Add typescript support to detectEncodings
Browse files Browse the repository at this point in the history
  • Loading branch information
aadsm authored Jan 13, 2022
1 parent 9b49243 commit af66fa6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ export interface IDetectedMap {
encoding: string,
confidence: number
}
export function detect(buffer: Buffer | string, options?: { minimumThreshold: number }): IDetectedMap;
export interface IOptionsMap {
minimumThreshold?: number,
detectEncodings?: Array<string>
}
export function detect(buffer: Buffer | string, options?: IOptionsMap): IDetectedMap;

export function detectAll(buffer: Buffer | string, options?: { minimumThreshold: number }): IDetectedMap[];
export function detectAll(buffer: Buffer | string, options?: IOptionsMap): IDetectedMap[];

export function enableDebug(): void;

0 comments on commit af66fa6

Please sign in to comment.