Fix types

This commit is contained in:
Jarred Sumner
2023-03-07 22:34:28 -08:00
parent 5b0277b6b8
commit cb8af3a4e7

View File

@@ -620,8 +620,26 @@ declare module "bun" {
*
* @param begin - start offset in bytes
* @param end - absolute offset in bytes (relative to 0)
* @param contentType - MIME type for the new FileBlob
*/
slice(begin?: number, end?: number): FileBlob;
slice(begin?: number, end?: number, contentType?: string): FileBlob;
/**
* Offset any operation on the file starting at `begin`
*
* Similar to [`TypedArray.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). Does not copy the file, open the file, or modify the file.
*
* If `begin` > 0, {@link Bun.write()} will be slower on macOS
*
* @param begin - start offset in bytes
* @param contentType - MIME type for the new FileBlob
*/
slice(begin?: number, contentType?: string): FileBlob;
/**
* @param contentType - MIME type for the new FileBlob
*/
slice(contentType?: string): FileBlob;
/**
* Incremental writer for files and pipes.