UNPKG

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