-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support multiple @types/node versions at once
- Loading branch information
1 parent
6ad11bc
commit 70a25d5
Showing
8 changed files
with
92 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
# Autogenerated | ||
*.d.ts | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/// <reference types="node" /> | ||
import * as fsPromises from "fs/promises" | ||
|
||
type E<T extends string> = typeof fsPromises extends { [m in T]: any } | ||
? typeof fsPromises[T] | ||
: undefined | ||
export const access: E<"access"> | ||
export const appendFile: E<"appendFile"> | ||
export const chmod: E<"chmod"> | ||
export const chown: E<"chown"> | ||
export const copyFile: E<"copyFile"> | ||
export const cp: E<"cp"> | ||
export const lchown: E<"lchown"> | ||
export const lutimes: E<"lutimes"> | ||
export const link: E<"link"> | ||
export const lstat: E<"lstat"> | ||
export const mkdir: E<"mkdir"> | ||
export const mkdtemp: E<"mkdtemp"> | ||
export const open: E<"open"> | ||
export const opendir: E<"opendir"> | ||
export const readdir: E<"readdir"> | ||
export const readFile: E<"readFile"> | ||
export const readlink: E<"readlink"> | ||
export const realpath: E<"realpath"> | ||
export const rename: E<"rename"> | ||
export const rmdir: E<"rmdir"> | ||
export const rm: E<"rm"> | ||
export const stat: E<"stat"> | ||
export const symlink: E<"symlink"> | ||
export const truncate: E<"truncate"> | ||
export const unlink: E<"unlink"> | ||
export const utimes: E<"utimes"> | ||
export const watch: E<"watch"> | ||
export const writeFile: E<"writeFile"> | ||
declare namespace _default { | ||
export { access } | ||
export { appendFile } | ||
export { chmod } | ||
export { chown } | ||
export { copyFile } | ||
export { cp } | ||
export { lchown } | ||
export { lutimes } | ||
export { link } | ||
export { lstat } | ||
export { mkdir } | ||
export { mkdtemp } | ||
export { open } | ||
export { opendir } | ||
export { readdir } | ||
export { readFile } | ||
export { readlink } | ||
export { realpath } | ||
export { rename } | ||
export { rmdir } | ||
export { rm } | ||
export { stat } | ||
export { symlink } | ||
export { truncate } | ||
export { unlink } | ||
export { utimes } | ||
export { watch } | ||
export { writeFile } | ||
} | ||
export default _default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/// <reference types="node" /> | ||
import * as fsSync from "fs" | ||
|
||
type E<T extends string> = typeof fsSync extends { [m in T]: any } | ||
? typeof fsSync[T] | ||
: undefined | ||
export const readdirSync: E<"readdirSync"> | ||
export const readFileSync: E<"readFileSync"> | ||
export const writeFileSync: E<"writeFileSync"> | ||
declare namespace _default { | ||
export { readdirSync } | ||
export { readFileSync } | ||
export { writeFileSync } | ||
} | ||
export default _default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters