title: How can I re-use a flowtype type definition on a class and its defaults without duplicating the type specification?
body: <p>Example of what I'm trying to do:</p>
  
  <pre><code>//@flow
  
  interface MyLibDefaults {
    foo: string,
    bar: boolean
  };
  
  class MyLib implements MyLibDefaults {
  
    defaults: MyLibDefaults;
  
    // do I really have to put these type specifications again? There are a lot of them....
    foo: string;
    bar: false;
  
  
    constructor() {
      this.defaults = {
        foo: "",
        bar: false
      };
  
      Object.assign(this, defaults);
    }
  
    ///...
    resetToDefaults() {
      Object.assign(this, defaults);
    }
  }
  </code></pre>
  
  <p>Maybe the interface isn't the right approach, but I can't figure out how to have my class "<code>extend</code>" the type definition with its own defaults. </p>