mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-29 01:45:49 +08:00
touch: Add closeAfter option (#29459)
This commit is contained in:
1
types/touch/index.d.ts
vendored
1
types/touch/index.d.ts
vendored
@@ -18,6 +18,7 @@ declare namespace touch {
|
||||
mtime?: boolean | Date;
|
||||
ref?: string;
|
||||
nocreate?: boolean;
|
||||
closeAfter?: boolean;
|
||||
}
|
||||
|
||||
function sync(filename: string, options?: Options): void;
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user