Port array.js and file.js to typescript

This commit is contained in:
Labhansh Agrawal 2019-09-11 20:06:47 +05:30 committed by Benjamin Staneck
parent b9ed180f27
commit 8524d37f9e
3 changed files with 6 additions and 4 deletions

View file

@ -1,3 +0,0 @@
export default function last(arr) {
return arr[arr.length - 1];
}

3
lib/utils/array.ts Normal file
View file

@ -0,0 +1,3 @@
export default function last<T>(arr: T[]): T {
return arr[arr.length - 1];
}

View file

@ -10,7 +10,9 @@
* PR: https://github.com/kevva/executable/pull/10
*/
export default function isExecutable(fileStat) {
import { Stats } from "fs";
export default function isExecutable(fileStat: Stats): boolean {
if (process.platform === 'win32') {
return true;
}