hello TypeScript: Define type of req object
Make it clearer that `req` is a CDS `Request` object.
This commit is contained in:
committed by
Daniel Hutzel
parent
7d9b4f7a5d
commit
730da6e435
@@ -1,5 +1,7 @@
|
||||
import { Request } from "@sap/cds/apis/services"
|
||||
|
||||
module.exports = class say {
|
||||
hello(req: any) {
|
||||
hello(req: Request) {
|
||||
return `Hello ${req.data.to} from a TypeScript file!`
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user