EnhamcePreflightFn is wrong

Open Beginner friendly
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
typescript
Domain
api

Research direction

Search the repository for EnhancePreflightFn and inspect its surrounding type definitions. Compare the callback parameter shape with the linked Enhance preflight documentation, update the type if confirmed, and run the repository's available TypeScript checks or tests.

Written by the indexing model from the issue text.

Description

Currently it is:

export type EnhancePreflightFn = (
  payload: EnhanceApiReq,
) => Promise<Record<string, any>> | Record<string, any>;

Looks like it should be

export type EnhancePreflightFn = ({
  req: EnhanceApiReq,
}) => Promise<Record<string, any>> | Record<string, any>;

based on https://enhance.dev/docs/conventions/preflight

Dominant language
TypeScript
Stars
8
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from enhance-dev/types

All issues in enhance-dev/types

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.