Skip to content

Instantly share code, notes, and snippets.

@satansdeer
Created May 24, 2020 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satansdeer/af21f5641515f968c34952589d95c25c to your computer and use it in GitHub Desktop.
Save satansdeer/af21f5641515f968c34952589d95c25c to your computer and use it in GitHub Desktop.
interface FullOfFields {
x: number;
y: string;
z: () => void;
}
type FullOfFieldsX = FullOfFields["x"]
interface Example extends Pick<FullOfFields, "x" | "y"> {
foo: string
}
const example: Example = {
x: 1,
y: "y",
foo: "bar"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment