Skip to content

Commit

Permalink
switch @checkjs @Noerrors
Browse files Browse the repository at this point in the history
  • Loading branch information
renejeglinsky committed Oct 2, 2024
1 parent 74494f6 commit 724ce23
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/cds-typer.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The following chapter describes the [`cds-typer` package](https://www.npmjs.com/
6. Model types now have to be imported to service implementation files by traditional imports of the generated files:

```js twoslash
// @checkJs
// @noErrors
const cds = require('@sap/cds')
const service = new cds.ApplicationService
// ---cut---
Expand All @@ -35,7 +35,7 @@ service.before('CREATE', Books, ({ data }) => { /* data is of type any */})
<p/>

```js twoslash
// @checkJs
// @noErrors
// @paths: {"#cds-models/*": ["%typedModels:bookshop:resolved%"]}
const cds = require('@sap/cds')
const service = new cds.ApplicationService
Expand Down Expand Up @@ -96,7 +96,7 @@ Note that your entities will expose additional capabilities in the context of CQ
The CRUD handlers `before`, `on`, and `after` accept generated types:

```js twoslash
// @checkJs
// @noErrors
// @paths: {"#cds-models/*": ["%typedModels:bookshop:resolved%"]}
const cds = require('@sap/cds')
const { Book, Books } = require('#cds-models/sap/capire/bookshop')
Expand Down Expand Up @@ -129,7 +129,7 @@ service.on('READ', Book, req => req.data.ID)
In the same manner, actions can be combined with `on`:

```js twoslash
// @checkJs
// @noErrors
// @paths: {"#cds-models/*": ["%typedModels:bookshop:resolved%"]}
const cds = require('@sap/cds')
const service = new cds.ApplicationService
Expand All @@ -151,7 +151,7 @@ You can remedy this by specifying the expected type with one of the following op
Using [JSDoc](https://jsdoc.app/) in JavaScript projects:

```js twoslash
// @checkJs
// @noErrors
// @paths: {"#cds-models/*": ["%typedModels:bookshop:resolved%"]}
const cds = require('@sap/cds')
const service = new cds.ApplicationService
Expand All @@ -170,7 +170,7 @@ function readBooksHandler (req) {
Using `import` in TypeScript projects:

```ts twoslash
// @checkJs
// @noErrors
// @paths: {"#cds-models/*": ["%typedModels:bookshop:resolved%"]}
import cds from '@sap/cds'
const service = new cds.ApplicationService
Expand Down

0 comments on commit 724ce23

Please sign in to comment.