title: Add/modify files in npm package through js code
body: <p>I am using <a href="https://www.npmjs.com/package/ep-mobx-router" rel="nofollow noreferrer">ep-mobx-router</a> v0.2.3 in a react typescript project, which is very similar to <a href="https://www.npmjs.com/package/mobx-router" rel="nofollow noreferrer">mobx-router</a>. The documentation page shows that beforeExit is a hook present in the package, but when I am trying to use it, it gives error that its not present in ep-mobx-router. I checked in my &quot;index.d.ts&quot; file in node modules of ep-mobx-router, only onEnter is present there.
  If I change in the node modules files, and add an entry for beforeEnter there, it works fine.</p>
  <pre><code>interface IRoute {
      path: string;
      component?: React.ComponentType&lt;any&gt; | React.ComponentType&lt;any&gt; | React.ReactElement&lt;any&gt; | null;
      async?: Promise&lt;any&gt;;
      onEnter?: LifecyclePropsType;beforeExit?: LifecyclePropsType
      onParamsChange?: LifecyclePropsType;
      childRoutes?: { [key: string]: any };
  } 
  </code></pre>
  <p>this interface is present in index.d.ts file in node modules of &quot;ep-mobx-router&quot;.</p>
  <p>And I want beforeExit also there, like -</p>
  <pre><code>interface IRoute {
      path: string;
      component?: React.ComponentType&lt;any&gt; | React.ComponentType&lt;any&gt; | React.ReactElement&lt;any&gt; | null;
      async?: Promise&lt;any&gt;;
      onEnter?: LifecyclePropsType;
      **beforeExit?: LifecyclePropsType**;
      onParamsChange?: LifecyclePropsType;
      childRoutes?: { [key: string]: any };
  }
  </code></pre>
  <p>How can I add this extra property to the interface through my react js code?</p>