当前位置:网站首页>TS---类型设置
TS---类型设置
2022-08-04 12:59:00 【monstkl】
一、基本类型数据
let a: number = 3
let a: string
let a: boolean二、数组
let a: string[] = ['jim']
let a: number[]
let a: boolean[]三、对象
let a: {
name: stirng,
age: number,
lesson: {
title: string
}[]
}
a = {
name: 'jim',
age: 18,
lesson: [
{title: '语文'},
{title: '数学'},
]
}四、函数
设置参数以及返回值
function sum (a: number, b: number): number {
return a + b
}边栏推荐
猜你喜欢
随机推荐
"Lonely Walking on the Moon" is a powerful medicine, it can't cure the internal friction of happy twist
【解决方案 三十一】Navicat数据库结构同步
拥有一台服务器,程序猿装X的开始
双目立体视觉笔记(二)
8/3 训练日志 (树状数组+区间覆盖+思维+01字典树)
高手,云集在于REST、gRPC 和 GraphQL之间!
Unity 3D模型展示框架篇之资源打包、加载、热更(Addressable Asset System | 简称AA)
广告电商系统开发
Django框架MySQL数据库到models模型的映射关系
使用COLMAP初步三维重建
The head module of the yolo series
鲜花“刺客”收割七夕
持续交付(二)PipeLine基本使用
搭建ros交叉编译环境(从x86到nvidia arm)
rpm安装提示error: XXX: not an rpm package (or package manifest):
Two years of independent development experience Programmers tell us the experience of making money (listen to the masters who really make money)
一分钟认识 IndexedDB 数据库,太强大了!
判断密码是否包含键盘连续字母
来 TDengine 开发者大会,洞悉数据技术发展的未来趋势
sqlplus报错ORA-12547: TNS:lost contact解决









