Skip to content

Commit

Permalink
feat(hops): add typings for config & server-data context hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuel Kluge authored and herschel666 committed Oct 28, 2019
1 parent 578407e commit 8677c9e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/hops/lib/runtime.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,18 @@ declare module 'hops' {

export const ConfigContext: React.Context<Config>;

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

export function useServerData<C = ServerData>(): C;

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

export function useConfig<C = Config>(): C;

export class Mixin {}

export const strategies: any;
Expand Down

0 comments on commit 8677c9e

Please sign in to comment.