title: TYPESCRIPT : Argument of type 'typeof X' is not assignable to parameter of type 'Y' with extends
body: <p>I am starting to code with typescript and I have a few compilation problems.</p>
  
  <p>I have several classes and it seems that I have a hierarchy problem</p>
  
  <p>On my first class (A) I indicated a set of properties / functions. I have a second class (B) which inherits from class (A) and which adds certain properties / functions. Finally I have a third class (C) which inherits from the second 
  class (B).</p>
  
  <pre class="lang-js prettyprint-override"><code>export default class A {
      prop1: string;
      function1() {
          console.log('TEST');
      }
  }
  
  export default class B extends A {
      prop2: string;
      function2() {
          console.log('TEST');
      }
  }
  
  export default class C extends B {
      prop3: string;
      function3() {
          console.log('TEST');
      }
  }
  </code></pre>
  
  <p>When compiling, I get the following error message :</p>
  
  <blockquote>
    <p>TS2345: Argument of type 'typeof C' is not assignable to parameter of
    type 'A'.    Type 'typeof C' is missing the following properties from
    type 'B': prop1, function1.</p>
  </blockquote>
  
  <p>My 3 classes are in 3 separate files and I use export / import and it seems to work ...</p>
  
  <p>Do you have an idea?</p>
  
  <p>TSCONFING:</p>
  
  <pre><code>{
    "compilerOptions": {
      "outDir": "./dist/",
      "noImplicitAny": true,
      "module": "es6",
      "target": "es5",
      "jsx": "react",
      "allowJs": true
    }
  }
  </code></pre>
  
  <p>I'm trying to make a code like this <a href="https://www.typescriptlang.org/play/?ssl=1&amp;ssc=1&amp;pln=75&amp;pc=2#code/KYDwDg9gTgLgBAYwDYEMDOa4GEIFtIB2wBMAQusHAN4BQc9cYUEYAXHGjFAJYEDmAbhp1EEApygBXBDGgAKJi1YTefAJTUR9GAAtuaAHSKwcALyNmYIfQC%20NOzVCRYiVBmx5CxeKBjEAJpg4%20GLe5GiUtAxwELrAUAAKluwq-EJaouJc0rJQCskcXKoANDFxiQWp6prR0WiSYPH5LGrWtdp6hrE68UksZmU9FSxtdg5O0PDI6JikkjCyBADixPHcCHC%20AUGeoSQ1DABG84t9bIU8acLRCGISOfLHC2JnKUX8GlHtHA1NAOTGP6lP7dXqWP6tDLRXT6AxPU6WAbwl6WNq2ezCCYuabuObPAgAZUaCG4ADN1psQH4CIE4HjFisiDwNl96MjCcTXhdVOkbndsjJHicxETgAguVVPlCGPVGnk-uyzhDpR1YezReLEeZ1ZzURkxsJMeBJq4Zh4QkQSAAxFCCqAAT00IigwD4%20j8Lv8ABV7Y00KwALIoMAAHiqpWCXhI4WAAD5rpl7na5FLoZ0DC63Zx4sBvb7gJhzEQAO5wIOh8PmqNkCixlOjBOZ91NHFoAByKFwwGU7z4pVbOCyUjtrEjexrEVTDDJcDkAEIYYYm9nPT6-QYdOg5K2O121FO07Dlx7c2uCwYIjBt25253gP2b4Ok7lIdE7OiRAgXSg-NeZrvu0rYx4hgbgCx7S5qlZOAZ3nRcM1dZtV3zQxNzQP8MAA-cDjTZhSwAUSgZh5S9HpTXcABtP44AAanI28u1ouA-gAXTgfwIALAgAB0-h8EB3UMDxJCQfweL4xBvz8OASxiQ4ACsxRgCE0TgBxoiQYApkfflh1yAZ4OPHM83XPgtIwhjgDUYoVRgrIUAIBBKCLYBSwHXSHjyYDYDAtBXwYF0YEkKACDszgHKchsMRoW4sjgG07XtekxCfeBzAVYUCD%20dIsW0s1koIBLckdLYaR2C1vCK6BHWg2Ln3kA9allJp-PaQzEJXOQqodArUtKAqNTJdZWrUhN6C-YAf2AAbiSGhA5B1MUJV7RrokC4LQvgiapq621it6-lSkWzUWlUsYgA" rel="nofollow noreferrer">link</a>. The error messages that sound on the site are not quite the same as I have in my editor, but maybe when correcting on the site I will find the final problem ...</p>
  
  <p>Thank you so much.</p>