title: Typescript: Get property field names of type
body: <p>I need to get all properties of type <code>number</code> of a type:</p>
  
  <pre><code>export interface ApplicationQuote {
      readonly chronoUnit: ApplicationQuote.ChronoUnitEnum;
      readonly downloadedDocs: number;
      readonly downloadedKb: number;
      readonly uploadedKb: number;
      readonly uploadedRefs: number;
  }
  export namespace ApplicationQuote {
      export type ChronoUnitEnum = 'HOUR' | 'DAY' | 'MONTH' | 'YEAR';
      export const ChronoUnitEnum = {
          HOUR: 'HOUR' as ChronoUnitEnum,
          DAY: 'DAY' as ChronoUnitEnum,
          MONTH: 'MONTH' as ChronoUnitEnum,
          YEAR: 'YEAR' as ChronoUnitEnum
      };
  }
  </code></pre>
  
  <p>I need to get an <code>Array&lt;string&gt;</code> like <code>["downloadedDocs", "downloadedKb", "uploadedKb", "uploadedRefs"]</code>.</p>
  
  <p>I've tried this code:</p>
  
  <pre><code>let names = Object.getOwnPropertyNames(ApplicationQuote);
  let keys = Object.keys(ApplicationQuote);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/s39Aj.png" rel="noreferrer"><img src="https://i.stack.imgur.com/s39Aj.png" alt="enter image description here"></a></p>