interface MyInterface {
        id: number;
        name: string;
        properties: string[];
      }
      type MyShortType = Omit<MyInterface, 'name' | 'id'>;
      
      Typescript language logo

      Omit type interface

      Codiga's TypeScript Recipes

      Construct a type that excludes properties from the given interface.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.