DefinitelyTyped/types/command-exists/command-exists-tests.ts
2018-12-06 23:22:53 +01:00

15 lines
279 B
TypeScript

import commandExists = require('command-exists');
commandExists('ls', (err, commandExists) => {
// $ExpectType boolean
commandExists;
});
commandExists('ls').then(command => {
// $ExpectType string
command;
});
// $ExpectType boolean
commandExists.sync('ls');