Doesn't support TypeScript

#1
by d9k - opened

Question

Write me typescript code to get keys of two types: T1, T2.

Answer

type T1 = {
    a: string;
}

type T2 = {
    b: number;
} | {
    c: boolean;
}

What is the type of T1 | T2? And what are its keys?

Sign up or log in to comment