mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-23 18:37:30 -07:00
14148f6c4a
Resolve #7779
10 lines
237 B
TypeScript
10 lines
237 B
TypeScript
import * as tmp from 'tmp';
|
|
|
|
export function createTemp(): Promise<[string, any]> {
|
|
return new Promise<[string, any]>((res, rej) => {
|
|
tmp.file((e, path, fd, cleanup) => {
|
|
if (e) return rej(e);
|
|
res([path, cleanup]);
|
|
});
|
|
});
|
|
}
|