Skip to content

Commit

Permalink
Update docstring and readme with changes requested in #277 (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecooper authored Jul 30, 2024
1 parent ff4ed5c commit 9f115a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ See the [Fauna Documentation](https://docs.fauna.com/fauna/current/) for additio
- [Contributing](#contributing)
- [Set up the repo](#set-up-the-repo)
- [Run tests](#run-tests)
- [Asserting types](#asserting-types)
- [Lint your code](#lint-your-code)
- [License](#license)

Expand Down Expand Up @@ -602,6 +603,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 types

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.
Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9f115a3

Please sign in to comment.