ts - 常用技巧
ru shui 2021-06-28 Less than 1 minute
# 提取接口中的 keys 作为 options
interface Person {
name: string
age: number
}
type OptionsOfPerson = {
[prop in keyof Person]: boolean
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
interface Person {
name: string
age: number
}
type OptionsOfPerson = {
[prop in keyof Person]: boolean
}
This app can be installed on your PC or mobile device. This will allow this web app to look and behave like any other installed app. You will find it in your app lists and be able to pin it to your home screen, start menus or task bars. This installed web app will also be able to safely interact with other apps and your operating system.