typescript
type Person = {
name : string
birthday : Date | null
}
const p:Person = {name:"Tom", birthday:null}
type FT = (id:number)==>string
const ft : FT = (id:number)==>id.toString
class A{
readonly
}
type alias
type Secret = "secret"
type Person = {
name : string
birthday : Date | Secret
}
type Person_ = [string, Date]
const p:Person = {name:"Tom", birthday:new Date()}
const p1:Person_ = ["Tom", new Date()]
const [name, birthday] = p1
浙公网安备 33010602011771号