Skip to content

Instantly share code, notes, and snippets.

@AvocadoVenom
Created August 2, 2019 17:52
Show Gist options
  • Select an option

  • Save AvocadoVenom/45322e335dd4ac7d042edb6b4d3e7972 to your computer and use it in GitHub Desktop.

Select an option

Save AvocadoVenom/45322e335dd4ac7d042edb6b4d3e7972 to your computer and use it in GitHub Desktop.
export class Filters {
public readonly format = 'JSON';
constructor(
public zone: 'ASI' | 'EUR' | 'USA',
public currency: 'EUR' | 'USD',
public userId: number
) { }
}
export type EditableFilters = keyof Omit<Filters, 'format'>;
// Typescript version lower than 3.5
// export type EditableFilters = keyof Pick<Filters, Exclude<keyof Filters, 'format'>>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment