mirror of
https://github.com/oven-sh/bun
synced 2026-02-18 06:41:50 +00:00
Fix types
This commit is contained in:
20
packages/bun-types/bun.d.ts
vendored
20
packages/bun-types/bun.d.ts
vendored
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user