1 Star 0 Fork 1

我不是达芬奇/study_typescript

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
08-TypeScript 中的 interface 接口.ts 600 Bytes
一键复制 编辑 原始数据 按行查看 历史
我不是达芬奇 提交于 2021-07-16 00:57 +08:00 . 90
interface Girl {
name: string,
age: number,
bust: number,
waistline?: string
}
const screenResume = (girl: Girl) => {
girl.age < 24 && girl.bust >= 90 && console.log('进入面试');
girl.age > 24 && girl.bust < 90 && console.log('你被淘汰');
}
const getscreenResume = (girl: Girl) => {
console.log(`她的名字是${girl.name},年龄${girl.age},胸围是${girl.bust},腰围是${girl.waistline}`);
}
const girl = {
name: '小美',
age: 20,
bust: 95,
waistline: ''
}
getscreenResume(girl)
screenResume(girl)
type Girl1 = string;
const gril = {
name: 'YINGZI'
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/iptu/study_typescript.git
git@gitee.com:iptu/study_typescript.git
iptu
study_typescript
study_typescript
master

搜索帮助