mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
13 lines
389 B
TypeScript
13 lines
389 B
TypeScript
import tempWrite = require('temp-write');
|
|
|
|
tempWrite('unicorn').then(path => {
|
|
path; // $ExpectType string
|
|
});
|
|
tempWrite('unicorn', 'pony.png'); // $ExpectType Promise<string>
|
|
tempWrite(process.stdin, 'pony.png');
|
|
tempWrite(new Buffer('pony'), 'pony.png');
|
|
|
|
tempWrite.sync('unicorn'); // $ExpectType string
|
|
tempWrite.sync(new Buffer('unicorn'));
|
|
tempWrite.sync('unicorn', 'pony.png');
|