let studentName:string = "Xiaoming"

let studentAge:number = 18

let isChecked:boolean = true

let now:Date = new Date();


//Interface
interface StudentInt{
    name:string
    age:number
    isChecked?:boolean
    works?:Array<string>
}

//Array
let studentList1:Array<StudentInt> = [
    {name:"Xiaoming",age:18},
    {name:"Xiaoming",age:18,isChecked:true}
]

let studentNew:StudentInt = {name:"Xiaoming",age:17,isChecked:true,works:["语文","数学"]}
studentList1.push(studentNew)

/**
 * 接口:提示词任务
 * @param progress {number} 任务的进度
 */
interface AgentTask{
    /**
     * 任务进度
     * 任务是否完成
     * 错误信息
     */
    progress:number 
    complete:boolean
    errorMsg:string 
}

//函数接口

/**
 * 统计签到人数
 */
function checkCount(studentList:Array<StudentInt>):number{
    let checkList = studentList.map(item=>item.isChecked?1:0)
    let count = 0;
    checkList.forEach(checked=>{
        if(checked==1) count ++
    })
    return count
}

let count = checkCount(studentList1)
console.log(count)