<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/angular</code> with <code class="notranslate">@types/angular-mocks</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
</ul>
<table role="table">
<thead>
<tr>
<th>Package</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td><code class="notranslate">typescript</code></td>
<td>2.4.2</td>
</tr>
<tr>
<td><code class="notranslate">@types/angular</code></td>
<td>1.6.28</td>
</tr>
<tr>
<td><code class="notranslate">@types/angular-mocks</code></td>
<td>1.5.10</td>
</tr>
</tbody>
</table>
<p dir="auto">Hello,</p>
<p dir="auto">Since I upgraded <code class="notranslate">@types/angular</code> package I have a problem with compilation. I'm getting following error when I try to run the test:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error TS2339: Property 'mock' does not exist on type 'IAngularStatic'."><pre class="notranslate"><code class="notranslate">error TS2339: Property 'mock' does not exist on type 'IAngularStatic'.
</code></pre></div>
<p dir="auto">The problem exists not only with <code class="notranslate">@types/angular-mock</code> but also angular-bootstrap, angular-growl-v2, etc. In short, everything that has an <code class="notranslate">angular.</code> prefix in definition files.</p>
<p dir="auto">I've found similar issues within this repo's page but none of the solutions or workarounds works.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked="">  I tried using the <code class="notranslate">@types/requirejs</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked="">  I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>.
<ul dir="auto">
<li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/andy-ms/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/andy-ms">@andy-ms</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wald-tq/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wald-tq">@wald-tq</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jens-duttke/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jens-duttke">@jens-duttke</a></li>
</ul>
</li>
</ul>
<p dir="auto">My index.ts file has following structure after the main code</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if( typeof exports === 'object' )  { 
    module.exports = xyz; 
} else if( define.amd ) {
    define('a',callback);
}"><pre class="notranslate"><code class="notranslate">if( typeof exports === 'object' )  { 
    module.exports = xyz; 
} else if( define.amd ) {
    define('a',callback);
}
</code></pre></div>
<p dir="auto">I need both @ types/requirejs for AMD module and 'define' &amp; also @ types/node otherwise it says cannot find name 'module'. Using both @ types/requirejs and @ types/node gives following errors.</p>
<p dir="auto"><code class="notranslate">@ types/requirejs Variable 'require' must be of type 'NodeRequire'</code> (Will this be resolved by renaming 'require' in one of them).<br>
<code class="notranslate">Duplicate identifier 'export='</code> (How do I resolve this ? )</p>
<p dir="auto">I want to use both types together, so I don't want to use --types tag when compiling, I have also excluded "node_modules" in tsconfig file. I am a newbie in typeScript so this might be a silly question. Please suggest a simple way to solve this.</p>