You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 24, 2021. It is now read-only.
import {Readable as ReadableStream} from 'stream';
import * as core from './core';
export type ReadableStreamWithFileType = core.ReadableStreamWithFileType;
export type FileTypeResult = core.FileTypeResult;
export type FileExtension = core.FileExtension;
export type MimeType = core.MimeType;
/**
Detect the file type of a file path.
The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
@param path - The file path to parse.
@returns The detected file type and MIME type or `undefined` when there is no match.
*/
export function fromFile(path: string): Promise<core.FileTypeResult | undefined>;