import fs from "fs-extra"; export const tryToGetFileChangeTime = (filePath: string): Promise => { return fs .stat(filePath) .then(file => file.mtime.getTime()) .catch(() => undefined); };