mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Update tempy to v0.2.x (#29681)
This commit is contained in:
Vendored
+5
-4
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user