Remote Functions: Exporting types
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the problem
We are currently building different libraries around SvelteKit and use the new Remote Functions.
They work pretty well, but when building and exporting I only get this in my .d.ts files:
export declare const getCustomEndpoint: any;
The correct type also inferred by the IDE is:
const getCustomEndpoint: RemoteQueryFunction<StandardSchemaV1.InferInput<Schema>, PayloadResult<unknown>>
Describe the proposed solution
It would be awesome if these types could also be correctly exported by SvelteKit.
Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository files or tests. Reproduce the build and export flow described, then inspect the generated declaration for getCustomEndpoint; it is done when the declaration preserves its RemoteQueryFunction type instead of exporting any.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100