Update tempy to v0.2.x (#29681)

This commit is contained in:
Gustav Bylund
2018-10-12 09:32:10 -07:00
committed by Andy
parent 1a39ab2687
commit 802bbfcfdc
2 changed files with 9 additions and 8 deletions
+5 -4
View File
@@ -1,9 +1,10 @@
// Type definitions for tempy 0.1
// Type definitions for tempy 0.2
// Project: https://github.com/sindresorhus/tempy#readme
// Definitions by: Douglas Duteil <https://github.com/douglasduteil>
// Definitions by: Douglas Duteil <https://github.com/douglasduteil>, Gustav Bylund <https://github.com/maistho>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function directoryAsync(): Promise<string>;
export function directory(): string;
export function file(options?: {extension: string}): string;
export function file(
options?: { extension: string } | { name: string }
): string;
export const root: string;
+4 -4
View File
@@ -1,12 +1,12 @@
import { directoryAsync, directory, file, root } from 'tempy';
import { directory, file, root } from "tempy";
//
directoryAsync().then((tempDir1: string) => tempDir1 === '/tmp/123456789');
const tempDir2: string = directory();
const tempFile: string = file();
const pngFile: string = file({extension: 'png'});
const pngFile: string = file({ extension: "png" });
const fileWithName: string = file({ name: "afile.txt" });
const tmpRoot: string = root;