smartfile/dist/smartfile.memory.d.ts

47 lines
1.2 KiB
TypeScript

/// <reference types="node" />
import 'typings-global';
export interface IVinylFile {
contents: Buffer;
base: string;
path: string;
}
/**
* converts file to Object
* @param fileStringArg
* @param fileTypeArg
* @returns {any|any}
*/
export declare let toObject: (fileStringArg: string, fileTypeArg: string) => any;
/**
* takes a string and converts it to vinyl file
* @param fileArg
* @param optionsArg
*/
export declare let toVinylFileSync: (fileArg: string, optionsArg?: {
filename?: string;
base?: string;
relPath?: string;
}) => any;
/**
* takes a string array and some options and returns a vinylfile array
* @param arrayArg
* @param optionsArg
*/
export declare let toVinylArraySync: (arrayArg: string[], optionsArg?: {
filename?: string;
base?: string;
relPath?: string;
}) => any[];
/**
* takes a vinylFile object and converts it to String
*/
export declare let vinylToStringSync: (fileArg: IVinylFile) => string;
/**
* writes string or vinyl file to disk.
* @param fileArg
* @param fileNameArg
* @param fileBaseArg
*/
export declare let toFs: (fileContentArg: string | IVinylFile, filePathArg: any) => Promise<{}>;
export declare let toFsSync: (fileArg: any, filePathArg: string) => void;