title: Use decorator to add meta data to interface properties
body: <p>Is it possible to use decorators to mark certain properties of an interface with some custom info?</p>
  
  <p>Best explained with an example:</p>
  
  <p><strong>App state interface:</strong></p>
  
  <pre><code>export interface AppState {
      @persist userData: UserData,
      @persist selectedCompany: UserCompany,
  
      // userCompanies should not be persisted since they are always
      // fetched afresh from the server...
      userCompanies: UserCompany[]
  }
  </code></pre>
  
  <p><strong>Method which persists all relevant state info:</strong></p>
  
  <pre><code>persistState(state) {
      let newState = {};
  
      Object.keys(state).forEach((key) =&gt; {
          if (state[key] is decorated with @persist) {
              newState[key] = state[key];
          }
      });
  
      // Persist newState...
  }
  </code></pre>
  
  <p>Is this possible?<br>
  If so, I'd really appreciate some resources to point me in the right direction!<br>
  If not, are there any elegant alternatives?</p>