cloud-cap-samples
cloud-cap-samples copied to clipboard
Explain how to compile the TypeScript code sample
-
Clarify how to implement the recommendation given on the capire page Using TypeScript:
For productive usage always precompile TypeScript code to JavaScript due to performance reasons and use the cds binary.
-
Add
tsconfig.json
in order to ensure that the generated JavaScript files can be understood by CAP and prevent error messages like:Service "say" has no handler for "hello".
PING :) @danjoa @chgeo
Originally proposed to:
- Extract the Hello World! TypeScript code sample to a dedicated folder in order to avoid polluting the Hello World! JavaScript code sample.
but the CAP team decided not have a separate variant of the hello
package (communicated internally by @chgeo), so moved back the missing TypeScript pieces to this folder.
Internal ticket is cap/issues#9166. This PR was adapted with the requested changes.