Answers for "merge two types typescript"

0

merge two types typescript

interface IStudent {
    id: string;
    age: number;
}

interface IWorker {
    companyId: string;
}

type IStudentAlias = IStudent;

type ICustomType = IStudent | IWorker;

let s: IStudentAlias = {
    id: 'ID3241',
    age: 2
};
Posted by: Guest on November-12-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language