Skip to content

Commit

Permalink
docs: Add conditional TypeScript block to migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Jun 15, 2023
1 parent d59896e commit 866936c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/guides/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Now `import { HookContext } from './declarations'` can be used as the context in
### Service types
<LanguageBlock global-id="ts">
Service types now only need the actual service class type and should no longer include the `& ServiceAddons<any>`. E.g. for the messages service like this:
```ts
Expand All @@ -64,6 +66,14 @@ declare module '../../declarations' {
}
```

</LanguageBlock>

<LanguageBlock global-id="js">

You have selected JavaScript as the language which does not have type information.

</LanguageBlock>

### Configuration types

A Feathers application can now also include types for the values of `app.set` and `app.get`. The configuration can also be validated and the type inferred from a [Feathers schema](../api/schema/index.md).
Expand Down

0 comments on commit 866936c

Please sign in to comment.