Skip to content

Commit

Permalink
Update execution-context.md
Browse files Browse the repository at this point in the history
When we say **type** usually it means typescript type. In this case it will be a **class** itself returned so such naming is more understandable.
  • Loading branch information
valerii15298 authored Dec 23, 2023
1 parent fbc947d commit 4c71172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/fundamentals/execution-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export interface ExecutionContext extends ArgumentsHost {
}
```

The `getHandler()` method returns a reference to the handler about to be invoked. The `getClass()` method returns the type of the `Controller` class which this particular handler belongs to. For example, in an HTTP context, if the currently processed request is a `POST` request, bound to the `create()` method on the `CatsController`, `getHandler()` returns a reference to the `create()` method and `getClass()` returns the `CatsController` **type** (not instance).
The `getHandler()` method returns a reference to the handler about to be invoked. The `getClass()` method returns the type of the `Controller` class which this particular handler belongs to. For example, in an HTTP context, if the currently processed request is a `POST` request, bound to the `create()` method on the `CatsController`, `getHandler()` returns a reference to the `create()` method and `getClass()` returns the `CatsController` **class** (not instance).

```typescript
const methodKey = ctx.getHandler().name; // "create"
Expand Down

0 comments on commit 4c71172

Please sign in to comment.