Testing a React component with Enzyme. Typescript can't find instance methods : <p>I want to test a React class component.</p>

<p>Let's say I have a method in my class that computes something based on the current state and props.</p>

<pre><code>import Component from './Component'

const wrapper = enzyme.shallow(&lt;Component {...props} /&gt;);

it('does something', () =&gt; {
  expect(wrapper.instance().someInstanceMethod(input)).toBe(true);
});
</code></pre>

<p>Typescript says <code>Property 'someInstanceMethod' is not defined on type Component&lt;any, any&gt;</code>. How can I tell Typscript how my class is looking and what methods it has?</p>

<p>Is there a good example for this?</p>
