touch: Add closeAfter option (#29459)

This commit is contained in:
Elizabeth Craig
2018-10-10 12:53:58 -07:00
committed by Andy
parent 273c8be397
commit 84521a00c5
2 changed files with 3 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ declare namespace touch {
mtime?: boolean | Date;
ref?: string;
nocreate?: boolean;
closeAfter?: boolean;
}
function sync(filename: string, options?: Options): void;

View File

@@ -25,6 +25,8 @@ opts.ref = strVal;
opts.nocreate = boolVal;
opts.closeAfter = boolVal;
let str: string;
// touch API tests
touch(strVal, (e) => console.log(e));