mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 05:38:41 -09:00
Port array.js and file.js to typescript
This commit is contained in:
parent
b9ed180f27
commit
8524d37f9e
3 changed files with 6 additions and 4 deletions
|
|
@ -1,3 +0,0 @@
|
||||||
export default function last(arr) {
|
|
||||||
return arr[arr.length - 1];
|
|
||||||
}
|
|
||||||
3
lib/utils/array.ts
Normal file
3
lib/utils/array.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
export default function last<T>(arr: T[]): T {
|
||||||
|
return arr[arr.length - 1];
|
||||||
|
}
|
||||||
|
|
@ -10,7 +10,9 @@
|
||||||
* PR: https://github.com/kevva/executable/pull/10
|
* 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') {
|
if (process.platform === 'win32') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue