Skip to content

Commit 90bfe33

Browse files
Add workaround for using bundler as the module-resolution in TypeScript (#744)
Co-authored-by: Sindre Sorhus <[email protected]>
1 parent a21fad1 commit 90bfe33

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 using `bundler` as the module-resolution in TypeScript.
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)