Skip to content

Commit baac819

Browse files
committed
The following workaround prevents TypeScript using "bundler" throwing compilation errors, fileTypeFromFile, does not exist.
1 parent a21fad1 commit baac819

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ export type AnyWebReadableByteStreamWithFileType = AnyWebReadableStream<Uint8Arr
194194
readonly fileType?: FileTypeResult;
195195
};
196196

197+
/**
198+
Workaround for TypeScript using "bundler" as the module-resolution.
199+
*/
200+
export function fileTypeFromFile(filePath: string, options?: {customDetectors?: Iterable<Detector>}): Promise<FileTypeResult | undefined>;
201+
197202
/**
198203
Returns a `Promise` which resolves to the original readable stream argument, but with an added `fileType` property, which is an object like the one returned from `fileTypeFromFile()`.
199204

0 commit comments

Comments
 (0)