diff --git a/README.md b/README.md index 2d6b20e2..790d04b5 100644 --- a/README.md +++ b/README.md @@ -602,6 +602,12 @@ Don't forget to give the project a star! Thanks again! 1. Start a docker desktop or other docker platform. 2. Run `yarn test`. This will start local fauna containers, verify they're up and run all tests. +### Asserting type behavior + +In cases where you are modifying types and need to test type enforcement, you can use `@ts-expect-error`. Using `@ts-expect-error` will supress any type errors on the following line. Conversely, if there's no error, TypeScript will report its usage as not being neccessary. + +To learn more about `@ts-expect-error`, you can read more about it in the TypeScript [release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#-ts-expect-error-comments). + ### Lint your code Linting runs automatically on each commit. diff --git a/src/client.ts b/src/client.ts index ad4e3b15..70f9df6e 100644 --- a/src/client.ts +++ b/src/client.ts @@ -271,7 +271,7 @@ export class Client { /** * Initialize a streaming request to Fauna * @typeParam T - The expected type of the response from Fauna. T can be inferred - * if theprovided query used a type parameter. + * if the provided query used a type parameter. * @param query - A string-encoded streaming token, or a {@link Query} * @returns A {@link StreamClient} that which can be used to listen to a stream * of events