Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepinho committed Jun 10, 2024
1 parent 952d349 commit 35e6633
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/zquery/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ export type { ZQueryState } from './types';
const capitalize = <Str extends string>(str: Str): Capitalize<Str> =>
(str.charAt(0).toUpperCase() + str.slice(1)) as Capitalize<Str>;

/**
* Some of the `createZQuery` props work differently depending on whether
* `props.fetch` returns a promise or an `AsyncIterable`. This utility function
* is a type predicate that informs our code both at compile- and run-time which
* type of props and data we're working with.
*/
const isStreaming = <
Name extends string,
State,
Expand Down

0 comments on commit 35e6633

Please sign in to comment.