[TYPECRIPT] Omit type when extending an interface Cách loại trừ các thuộc tính khỏi giao diện (ok)
https://stackoverflow.com/questions/51063976/how-to-exclude-properties-from-interface-while-inheriting
Typescript >3.5
type Person = {
name: string;
age: number;
location: string;
};
type QuantumPerson = Omit<Person, "location">;
// equivalent to
type QuantumPerson = {
name: string;
age: number;
};
Hoặc
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
Previous[NODEJS] object hóa một file trong javascript Nodejs - require, exports and module.exportsNextHow TO - List Grid View (ok)
Last updated