# 函数的使用

'this' implicitly has type 'any' because it does not have a type annotation.ts(2683)

function (this: any, text: string) {
    console.log(this);
};
1
2
3

经过 TypeScript 编译器编译后,参数将忽略 this

function (text) {
    console.log(this);
};
1
2
3