From 866936c25ec2867c7bd5dd025b72f6d83d6065c3 Mon Sep 17 00:00:00 2001 From: daffl Date: Wed, 14 Jun 2023 19:35:51 -0700 Subject: [PATCH 1/2] docs: Add conditional TypeScript block to migration guide --- docs/guides/migrating.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/guides/migrating.md b/docs/guides/migrating.md index dddf879a43..c7e2df9da7 100644 --- a/docs/guides/migrating.md +++ b/docs/guides/migrating.md @@ -53,6 +53,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`. E.g. for the messages service like this: ```ts @@ -64,6 +66,14 @@ declare module '../../declarations' { } ``` + + + + +You have selected JavaScript as the language which does not have type information. + + + ### 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). From 85974b487ecbf596eb29abc683bad7903044130c Mon Sep 17 00:00:00 2001 From: daffl Date: Wed, 14 Jun 2023 19:41:01 -0700 Subject: [PATCH 2/2] Make all TypeScript stuff conditional --- docs/guides/migrating.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/guides/migrating.md b/docs/guides/migrating.md index c7e2df9da7..8cfd803d93 100644 --- a/docs/guides/migrating.md +++ b/docs/guides/migrating.md @@ -27,6 +27,14 @@ The new [schemas and resolvers](../api/schema/index.md) cover most use cases pre ## TypeScript + + +You have selected JavaScript as the language which does not have type information. + + + + + 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 @@ -53,7 +61,7 @@ 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`. E.g. for the messages service like this: @@ -66,14 +74,6 @@ declare module '../../declarations' { } ``` - - - - -You have selected JavaScript as the language which does not have type information. - - - ### 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). @@ -104,6 +104,8 @@ declare module '@feathersjs/feathers/lib/declarations' { } ``` + + ## Deprecations and breaking changes ### Express middleware order