Skip to content

Commit

Permalink
types: Add 'stat' and 'delete' methods to BunFile type (#16307)
Browse files Browse the repository at this point in the history
Co-authored-by: cainba <[email protected]>
  • Loading branch information
cainba and cainba authored Jan 11, 2025
1 parent ce68e5e commit 83decec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/bun-types/bun.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,16 @@ declare module "bun" {
* Deletes the file.
*/
unlink(): Promise<void>;

/**
* Deletes the file. ( same as unlink )
*/
delete(): Promise<void>

/**
* Provides useful information about the file.
*/
stat(): Promise<Stats>
}
interface NetworkSink extends FileSink {
/**
Expand Down

0 comments on commit 83decec

Please sign in to comment.