file-type 20.4.0 → 20.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core.d.ts +5 -0
- package/package.json +1 -1
package/core.d.ts
CHANGED
|
@@ -194,6 +194,11 @@ export type AnyWebReadableByteStreamWithFileType = AnyWebReadableStream<Uint8Arr
|
|
|
194
194
|
readonly fileType?: FileTypeResult;
|
|
195
195
|
};
|
|
196
196
|
|
|
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
|
+
|
|
197
202
|
/**
|
|
198
203
|
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()`.
|
|
199
204
|
|