Skip to content

Commit

Permalink
remove @checkJS, add @Noerrors
Browse files Browse the repository at this point in the history
  • Loading branch information
renejeglinsky committed Oct 2, 2024
1 parent 93135d9 commit e1ba665
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node.js/cds-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ A one-time event, emitted immediately after the [express.js app](cds-facade#cds-
has been created and before any middleware or CDS services are added to it.

```js twoslash
// @checkJs
// @noErrors
const cds = require('@sap/cds')
const express = require('express')
cds.on('bootstrap', app => {
Expand Down Expand Up @@ -180,7 +180,7 @@ Emitted for each service constructed by [`cds.serve`](cds-serve).
A one-time event, emitted when all services have been bootstrapped and added to the [express.js app](cds-facade#cds-app).

```js twoslash
// @checkJs
// @noErrors
const cds = require('@sap/cds')
cds.on('served', (services)=>{
// We can savely access service instances through the provided argument:
Expand Down Expand Up @@ -215,7 +215,7 @@ This is due to `cds.on()` and `cds.emit()` using Node's [EventEmitter](https://n
In other words this asynchronous handler code does **not work** as expected:

```js twoslash
// @checkJs
// @noErrors
const cds = require('@sap/cds')
const asyncCode = async () => Promise.resolve()
// ---cut---
Expand Down

0 comments on commit e1ba665

Please sign in to comment.