Skip to content

Commit

Permalink
docs: Add conditional TypeScript block to migration guide (#3216)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl authored Jun 15, 2023
1 parent 3f96204 commit 2b7a267
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/guides/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ The new [schemas and resolvers](../api/schema/index.md) cover most use cases pre

## TypeScript

<LanguageBlock global-id="js">

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

</LanguageBlock>

<LanguageBlock global-id="ts">

The new version comes with major improvements in TypeScript support from improved service typings, fully typed hook context and typed configuration. You can see the changes necessary in the Feathers chat [here](https://github.com/feathersjs/feathers-chat-ts/compare/dove-pre).

### Application and hook context
Expand All @@ -53,6 +61,8 @@ Now `import { HookContext } from './declarations'` can be used as the context in
### Service types
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 Down Expand Up @@ -94,6 +104,8 @@ declare module '@feathersjs/feathers/lib/declarations' {
}
```

</LanguageBlock>

## Deprecations and breaking changes

### Express middleware order
Expand Down

0 comments on commit 2b7a267

Please sign in to comment.