title: "Variable declaration expected" in Nodejs typescript app
body: <p>Created a method to delete the file in directory.</p>
  
  <pre><code>const delete: (dirName: string, fileName: string, callback: (error: string | boolean) =&gt; void) =&gt; void = (dirName, fileName, callback) =&gt; {
    fs.unlink(baseDataDir + dirName + "/" + fileName + ".json", (error) =&gt; {
      if (!error) {
        callback(false);
      } else {
        callback(error);
      }
    });
  };
  
  const fsHandler: IFSHandler = {
    create,
    read,
    update,
    delete
  };
  
  module.exports = fsHandler;
  </code></pre>
  
  <p>Interface defined for <code>fsHandler</code>:</p>
  
  <pre><code>export interface IFSHandler {
    create: (dirName: string, fileName: string, data: any, callback: (error: string | boolean) =&gt; void) =&gt; void;
    read: (dirName: string, fileName: string, callback: (error: string | boolean, data: any) =&gt; void) =&gt; void;
    update: (dirName: string, fileName: string, data: any, callback: (error: string | boolean, fileDesc: any) =&gt; void) =&gt; void;
    delete: (dirName: string, fileName: string, callback: (error: string | boolean) =&gt; void) =&gt; void;
  }
  </code></pre>
  
  <p>Typescript Errors: </p>
  
  <pre><code>yarn run v1.13.0
  $ tsc &amp;&amp; node dist/index.js
  src/services/fsHandler.ts:69:7 - error TS1134: Variable declaration expected.
  
  69 const delete: (dirName: string, fileName: string, callback: (error: string | boolean) =&gt; void) =&gt; void = (dirName, fileName, callback) =&gt; {
           ~~~~~~
  
  src/services/fsHandler.ts:69:13 - error TS1109: Expression expected.
  
  69 const delete: (dirName: string, fileName: string, callback: (error: string | boolean) =&gt; void) =&gt; void = (dirName, fileName, callback) =&gt; {
                 ~
  
  src/services/fsHandler.ts:69:104 - error TS1109: Expression expected.
  
  69 const delete: (dirName: string, fileName: string, callback: (error: string | boolean) =&gt; void) =&gt; void = (dirName, fileName, callback) =&gt; {
                                                                                                            ~
  
  src/services/fsHandler.ts:84:1 - error TS1005: ':' expected.
  
  84 };
     ~
  
  
  Found 4 errors.
  
  error Command failed with exit code 2.
  </code></pre>