// js 中的 typeof // console.log(typeof 'hello TS') // TS 中的 typeof let p = { x: 1, y: 2 } // function formatPoint(point: {x: number; y: number }) {} // 使用 typeof function formatPoint(point: typeof p ) {} formatPoint({ x: 1, y: 100 }) // 查看 p对象中属性 x let num: typeof p.x