1

Say I have the following code

const myObj = {
    a: {
        b: 'a/b',
    },
    c: {
        d: 'c/d',
    }
} as const

type T = ...
// T === 'a/b' | 'c/d'

Is is possible?

Thanks in advance!

WW00WW
  • 417
  • 4
  • 15

0 Answers0