import { expectAssignable } from "@typescript/tests" ; import { omitProps } from "@components/shared" ; interface MyObject { a : string ; b : string ; c ? : string ; } const obj = { a : "param1" , b : "param2" } ; const result = omitProps ( obj , [ "a" ] ) ; expectAssignable < Omit < MyObject , "a" > > ( result ) ; expectAssignable < string > ( result . b ) ; expectAssignable < string > ( result . c ) ; expectAssignable < any > ( result . a ) ; expectAssignable < MyObject > ( result ) ;