Skip to content

Commit 975eb55

Browse files
authored
Update controllers.md (type 'params' as 'any')
Without specifying the variable 'params' as type 'any' I received the following error on a fresh project while following the documentation: ```typescript findOne(@param() params): string { ``` ``` error TS7006: Parameter 'params' implicitly has an 'any' type. ```
1 parent 901cb40 commit 975eb55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/controllers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ Routes with static paths won't work when you need to accept **dynamic data** as
273273
```typescript
274274
@@filename()
275275
@Get(':id')
276-
findOne(@Param() params): string {
276+
findOne(@Param() params: any): string {
277277
console.log(params.id);
278278
return `This action returns a #${params.id} cat`;
279279
}

0 commit comments

Comments
 (0)