Skip to content

Commit

Permalink
feat(hops): improve type definitions for withServerData and withConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
jhiode authored and actions-user committed Nov 11, 2019
1 parent df7b9e4 commit 328e094
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/hops/lib/runtime.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ declare module 'hops' {

export const ConfigContext: React.Context<Config>;

export function withServerData<Props>(
Component: React.ComponentType<Props & { serverData: ServerData }>
): React.ComponentType<Props>;
export function withServerData<P, C = ServerData,>(
Component: React.ComponentType<P & { serverData: C }>
): React.ComponentType<P>;

export function withConfig<Props>(
Component: React.ComponentType<Props & { config: Config }>
): React.ComponentType<Props>;
export function withConfig<P, C = Config>(
Component: React.ComponentType<P & { config: C }>
): React.ComponentType<P>;

export class Mixin {}

Expand Down

0 comments on commit 328e094

Please sign in to comment.