From a509ab29d839f675c82aeba06b4813524eaec992 Mon Sep 17 00:00:00 2001 From: Ciro Spaciari Date: Mon, 6 Jan 2025 19:01:32 -0800 Subject: [PATCH] stats --- packages/bun-types/bun.d.ts | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/packages/bun-types/bun.d.ts b/packages/bun-types/bun.d.ts index 37eabd38858cf4..e4f66b59f93faa 100644 --- a/packages/bun-types/bun.d.ts +++ b/packages/bun-types/bun.d.ts @@ -17,6 +17,7 @@ declare module "bun" { import type { FFIFunctionCallableSymbol } from "bun:ffi"; import type { Encoding as CryptoEncoding } from "crypto"; import type { CipherNameAndProtocol, EphemeralKeyInfo, PeerCertificate } from "tls"; + import type { Stats } from "node:fs"; interface Env { NODE_ENV?: string; /** @@ -1139,35 +1140,6 @@ declare module "bun" { * ); * ``` */ - interface StatsBase { - isFile(): boolean; - isDirectory(): boolean; - isBlockDevice(): boolean; - isCharacterDevice(): boolean; - isSymbolicLink(): boolean; - isFIFO(): boolean; - isSocket(): boolean; - dev: T; - ino: T; - mode: T; - nlink: T; - uid: T; - gid: T; - rdev: T; - size: T; - blksize: T; - blocks: T; - atimeMs: T; - mtimeMs: T; - ctimeMs: T; - birthtimeMs: T; - atime: Date; - mtime: Date; - ctime: Date; - birthtime: Date; - } - interface FileStats extends StatsBase {} - interface BunFile extends Blob { /** * Offset any operation on the file starting at `begin` and ending at `end`. `end` is relative to 0 @@ -1274,7 +1246,7 @@ declare module "bun" { /** * Get the stat of the file. */ - stat(): Promise; + stat(): Promise; } var S3Client: S3Client;