hello TypeScript: Define type of req object

Make it clearer that `req` is a CDS `Request` object.
This commit is contained in:
Pierre Fritsch
2021-08-04 13:58:21 +02:00
committed by Daniel Hutzel
parent 7d9b4f7a5d
commit 730da6e435

View File

@@ -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!`
}
}