Scott

ts高级用法 a year ago

typescript
209个字符
共有108人围观

extract type from something else

const project = {
    title:"scott",
    specification: {
        areaSize: 100,
        rooms:3
    }
}

type Specification = typeof project["specification"]