Guest User

Untitled

a guest
May 20th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. public async invoke(): Promise<void> {
  2. return new Promise<void>((res, rej) => {
  3. fs.readFile(this.templatePath, (outerError: NodeJS.ErrnoException, data: Buffer): void => {
  4. if (outerError !== null) {
  5. rej(new Error(`FileNotFoundException: Cannot find file `${this.templatePath}'.`));
  6. }
  7. });
  8.  
  9. })
  10. }
Add Comment
Please, Sign In to add comment