声明类型相同的变量时,变量的值作为变量的类型?
Author: mythFristCreated Apr 13, 2021Updated Apr 13, 2021
const foo = 123 const bar: typeof foo = 456 bar 的类型为123
Source: jkchao/typescript-book-chinese
const foo = 123 const bar: typeof foo = 456 bar 的类型为123
Source: jkchao/typescript-book-chinese