UNPKG

821 BTypeScriptView Raw
1import { Match } from './match';
2interface FullOptions {
3 sampleSize: number;
4}
5declare type Options = Partial<FullOptions>;
6declare type DetectResult = Match[] | string | null;
7export declare const detect: (buffer: Uint8Array) => string | null;
8export declare const analyse: (buffer: Uint8Array) => Match[];
9export declare const detectFile: (filepath: string, opts?: Options) => Promise<DetectResult>;
10export declare const detectFileSync: (filepath: string, opts?: Options) => DetectResult;
11declare const _default: {
12 analyse: (buffer: Uint8Array) => Match[];
13 detect: (buffer: Uint8Array) => string | null;
14 detectFileSync: (filepath: string, opts?: Partial<FullOptions>) => DetectResult;
15 detectFile: (filepath: string, opts?: Partial<FullOptions>) => Promise<DetectResult>;
16};
17export default _default;