Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Why is There No Typescript Documentation? #974

Open
Labels
questionFurther information is requested
@jwalkerinterpres

Description

This library clearly supports TypeScript, because I see types mentioned in the commit messages, eg.

fix(types): move types to optional peer dependencies

However, the word "type" doesn't even appear in your documentation or readme file. To be fair, types don't exactly require a ton of docs, but it'd be nice to at least mention how they're supposed to be used.

For instance:

 // Error: Property 'foo' does not exist on type 'RenderHookResult<MyHook<object>, unknown>'.ts
 const { foo } = renderHook(hook);
// Error: Expected 2-5 type arguments, but got 1.ts(2558)
const { foo } = renderHook<{ foo: any }>(hook);

So it seems renderHooks expects 2-5 type arguments ... surely you could spare a few lines in the docs to tell us what those arguments should be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /