fs-extra-p
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,7 +0,2 @@ | ||
// Type definitions for bluebird 2.0.0 | ||
// Project: https://github.com/petkaantonov/bluebird | ||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, falsandtru <https://github.com/falsandtru> | ||
// Definitions: https://github.com/borisyankov/DefinitelyTyped | ||
declare module 'bluebird' { | ||
declare module "bluebird" { | ||
interface Disposer { | ||
@@ -17,2 +12,6 @@ } | ||
static all<T>(values: Iterable<T | PromiseLike<T>>): BluebirdPromise<T[]> | ||
static map<T>(items: Iterable<T | PromiseLike<T>>, mapper: (item: T) => BluebirdPromise<any>): BluebirdPromise<any> | ||
static mapSeries<T>(items: Iterable<T>, mapper: (item: T) => BluebirdPromise<any>): BluebirdPromise<any> | ||
@@ -19,0 +18,0 @@ |
@@ -13,5 +13,17 @@ import { Stats, WriteStream } from "fs" | ||
export interface CopyOptions { | ||
clobber?: boolean | ||
filter?: RegExp | ((path: string) => boolean) | ||
} | ||
export interface MoveOptions { | ||
clobber?: boolean | ||
limit?: number | ||
} | ||
export function copy(src: string, dest: string, options?: CopyOptions): Promise<string> | ||
export function copySync(src: string, dest: string, options?: CopyOptions): Promise<void> | ||
export function move(src: string, dest: string, options?: MoveOptions): Promise<any> | ||
export function ensureFile(path: string): Promise<void> | ||
@@ -35,3 +47,3 @@ export function ensureFileSync(path: string): void | ||
export function readJson(file: string, options?: OpenOptions): Promise<void> | ||
export function readJson(file: string, options?: OpenOptions): Promise<any> | ||
export function readJsonSync(file: string, options?: OpenOptions): any | ||
@@ -42,5 +54,9 @@ | ||
export function writeJson(file: string, object: any, options?: OpenOptions): Promise<void> | ||
export function writeJsonSync(file: string, object: any, options?: OpenOptions): void | ||
interface JsonOptions extends OpenOptions { | ||
spaces: number | ||
} | ||
export function writeJson(file: string, object: any, options?: JsonOptions): Promise<void> | ||
export function writeJsonSync(file: string, object: any, options?: JsonOptions): void | ||
export function rename(oldPath: string, newPath: string): Promise<string> | ||
@@ -164,6 +180,2 @@ export function renameSync(oldPath: string, newPath: string): void | ||
mode?: number | ||
} | ||
export interface CopyOptions { | ||
filter: RegExp | ((path: string) => boolean) | ||
} |
@@ -36,3 +36,3 @@ "use strict" | ||
const method = fsExtra[methodName] | ||
if (method === "createFile" || method === "copy" || method === "rename" || method === "mkdirp") { | ||
if (methodName === "createFile" || methodName === "copy" || methodName === "rename" || methodName === "mkdirp") { | ||
continue | ||
@@ -39,0 +39,0 @@ } |
{ | ||
"name": "fs-extra-p", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "fs-extra module promisified with bluebird", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13336
211