Typescript conditional type based on writability

37 views Asked by At

Does typescript have a way to conditionally filter a type based on property writability or readability? For example:

interface Foo {
  readonly x: string;
  y: string
}
type FooOptions = Writable<Foo>; // { y: string }
0

There are 0 answers