feat(fs-extra-promise): add missing interfaces

This commit is contained in:
HiromiShikata
2017-06-18 19:59:44 +09:00
parent a19e9bf8bf
commit cb2189e184
4 changed files with 28 additions and 2 deletions
@@ -42,6 +42,7 @@ var openOpts: fs.OpenOptions;
var watcher: fs.FSWatcher;
var readStreeam: stream.Readable;
var writeStream: stream.Writable;
var isDirectory: boolean;
fs.copy(src, dest, errorCallback);
fs.copy(src, dest, (src: string) => {
@@ -222,3 +223,11 @@ writeStream = fs.createWriteStream(path, {
flags: str,
encoding: str
});
var isDirectoryCallback = (err: Error, isDirectory: boolean) => {
};
fs.isDirectory(path, isDirectoryCallback);
fs.isDirectory(path);
isDirectory = fs.isDirectorySync(path);
fs.isDirectoryAsync(path);
+5 -1
View File
@@ -1,6 +1,6 @@
// Type definitions for fs-extra-promise-es6
// Project: https://github.com/vinsonchuong/fs-extra-promise-es6
// Definitions by: midknight41 <https://github.com/midknight41>, Jason Swearingen <https://github.com/jasonswearingen>, Joshua DeVinney <https://github.com/geoffreak>
// Definitions by: midknight41 <https://github.com/midknight41>, Jason Swearingen <https://github.com/jasonswearingen>, Joshua DeVinney <https://github.com/geoffreak>, Hiromi Shikata <https://github.com/HiromiShikata>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Imported from: fs-extra-promise typings (minus Bluebird)
@@ -239,3 +239,7 @@ export declare function appendFileAsync(filename: string, data: any, option?: Op
export declare function existsAsync(path: string): Promise<boolean>;
export declare function ensureDirAsync(path: string): Promise<void>;
export declare function isDirectory(path: string, callback?: (err: Error, isDirectory: boolean) => void): void;
export declare function isDirectorySync(path: string): boolean;
export declare function isDirectoryAsync(path: string): Promise<boolean>;
@@ -43,6 +43,7 @@ var writeOpts: fs.WriteOptions;
var watcher: fs.FSWatcher;
var readStream: stream.Readable;
var writeStream: stream.Writable;
var isDirectory: boolean;
fs.copy(src, dest, errorCallback);
fs.copy(src, dest, (src: string) => {
@@ -219,3 +220,11 @@ writeStream = fs.createWriteStream(path, {
flags: str,
encoding: str
});
var isDirectoryCallback = (err: Error, isDirectory: boolean) => {
};
fs.isDirectory(path, isDirectoryCallback);
fs.isDirectory(path);
isDirectory = fs.isDirectorySync(path);
fs.isDirectoryAsync(path);
+5 -1
View File
@@ -1,6 +1,6 @@
// Type definitions for fs-extra-promise 1.0
// Project: https://github.com/overlookmotel/fs-extra-promise
// Definitions by: midknight41 <https://github.com/midknight41>, Jason Swearingen <https://github.com/jasonswearingen>
// Definitions by: midknight41 <https://github.com/midknight41>, Jason Swearingen <https://github.com/jasonswearingen>, Hiromi Shikata <https://github.com/HiromiShikata>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
@@ -90,3 +90,7 @@ export declare function appendFileAsync(filename: string, data: any, option?: Wr
export declare function existsAsync(path: string): Promise<boolean>;
export declare function ensureDirAsync(path: string): Promise<void>;
export declare function isDirectory(path: string, callback?: (err: Error, isDirectory: boolean) => void): void;
export declare function isDirectorySync(path: string): boolean;
export declare function isDirectoryAsync(path: string): Promise<boolean>;