kiliman / remix-typedjson

This package is a replacement for superjson to use in your Remix app. It handles a subset of types that `superjson` supports, but is faster and smaller.
MIT License
435 stars 19 forks source link

export TypedFetcherWithComponents type #17

Closed joelazar closed 1 year ago

joelazar commented 1 year ago

Exporting the TypedFetcherWithComponents comes handy, when you would like to pass around a fetcher in react components and you would like to type those components.

Also, it's exported in the remix-react base package as well.

kiliman commented 1 year ago

Thanks for the PR!

lukebowerman commented 1 year ago

Hi! This PR actually solves a problem I ran into this morning but when I pulled in 0.1.5 of the package I'm not seeing the TypedFetcherWithComponents in the resulting dist/index.d.ts file. Is is possible that the deploy didn't actually reflect this change?

Contents of index.d.ts from NPM package v0.1.5:

export { deserializeRemix, redirect, stringifyRemix, typedjson, useTypedActionData, useTypedFetcher, useTypedLoaderData, } from './remix';
export type { TypedJsonResponse, TypedMetaFunction } from './remix';
export { applyMeta, deserialize, parse, serialize, stringify, } from './typedjson';
export type { MetaType, TypedJsonResult } from './typedjson';
kiliman commented 1 year ago

Sorry. Not sure what happened. Anyway, I rebuilt and repubilshed as v0.1.6.

lukebowerman commented 1 year ago

@kiliman - No worries! Thank you for the quick fix and really appreciate the package :)