constructor() { // 因为food本身是我们定义,所以不存在获取不到的情况,因此!用来表示排除null和undefined this.element = document.getElementById('food')!
class Food{
    element: HTMLElement;
    constructor() {
        this.element = document.getElementById('food') as HTMLElement