text: Q:
  
  Extract Interface from Existing Literal
  
  Say I have an object literal as follows:
  const defaultSettings = {
    height: 100,
    width: 100,
    color: 'red'
  }
  
  Is there any way to easily obtain an interface for that object instead of having to declare one like this by hand?
  interface Settings {
    height: number,
    width: number,
    color: string
  }
  
  A:
  
  In newer versions of TypeScript, you can extend type aliases with an interface. So you could get an interface by doing the following:
  const defaultSettings = {
      height: 100,
      width: 100,
      color: 'red'
  };
  
  type SettingsTypeAlias = typeof defaultSettings;
  
  interface Settings extends SettingsTypeAlias {
  }
  
  But I don't see the need for that. You might as well just do:
  type Settings = typeof defaultSettings;
  
  