# TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.

> this is used in a function whose this type is unknown, under noImplicitAny. Use an arrow function, a method, or declare a this parameter.

## What it means

Inside a plain `function`, `this` depends on how the function is called. When the checker can't
tell its type from context and `noImplicitAny` (part of `strict`) is on, using `this` is an error.

## Example

```ts
function getName() {
  return this.name;
}
export {};
```

## How to fix

- Declare the expected type with a `this` parameter: `function getName(this: { name: string })`.
- Use an arrow function to capture the outer `this`, or make it a method of a class or object literal.

Source: https://ts-r.dev/errors/TS2683/
