Skip to content

Commit 898256c

Browse files
authored
build(types): 🏷️ update withIoc TS types (#39)
1 parent 4591cbf commit 898256c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/gene/src/ioc/react.ioc.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,11 @@ export function useCallbackInjection<T, R = void>(
108108
}
109109
}
110110

111-
export function withIoc<T>(getContainer: (props: T) => interfaces.Container) {
112-
return (Page: React.ComponentType<T>) => {
113-
return (props: T) => {
111+
export function withIoc<Props extends Record<string, any>>(
112+
getContainer: (props: Props) => interfaces.Container
113+
) {
114+
return (Page: React.ComponentType<Props>) => {
115+
return (props: Props) => {
114116
const container = getContainer(props);
115117

116118
return (

0 commit comments

Comments
 (0)