UNPKG

1.09 kBTypeScriptView Raw
1// tslint:disable-next-line:no-bad-reference
2/// <reference path="../fs.d.ts" />
3
4declare module 'fs' {
5 interface BigIntStats extends StatsBase<BigInt> {
6 }
7
8 class BigIntStats {
9 atimeNs: BigInt;
10 mtimeNs: BigInt;
11 ctimeNs: BigInt;
12 birthtimeNs: BigInt;
13 }
14
15 interface BigIntOptions {
16 bigint: true;
17 }
18
19 interface StatOptions {
20 bigint: boolean;
21 }
22
23 function stat(path: PathLike, options: BigIntOptions, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
24 function stat(path: PathLike, options: StatOptions, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
25
26 namespace stat {
27 function __promisify__(path: PathLike, options: BigIntOptions): Promise<BigIntStats>;
28 function __promisify__(path: PathLike, options: StatOptions): Promise<Stats | BigIntStats>;
29 }
30
31 function statSync(path: PathLike, options: BigIntOptions): BigIntStats;
32 function statSync(path: PathLike, options: StatOptions): Stats | BigIntStats;
33}