| 1 | // The parts of node:zlib and node:crypto that @diffinery/git-core uses (zlib.ts, sha1.ts). The Worker |
| 2 | // has them at runtime through nodejs_compat, but type-checks without @types/node. |
| 3 | declare module "node:zlib" { |
| 4 | interface ZlibOptions { |
| 5 | chunkSize?: number; |
| 6 | maxOutputLength?: number; |
| 7 | } |
| 8 | function inflateSync(data: Uint8Array, options?: ZlibOptions): Uint8Array; |
| 9 | } |
| 10 | |
| 11 | declare module "node:crypto" { |
| 12 | interface Hash { |
| 13 | update(data: Uint8Array): Hash; |
| 14 | digest(): Uint8Array; |
| 15 | } |
| 16 | function createHash(algorithm: "sha1"): Hash; |
| 17 | } |