Skip to content

Commit

Permalink
Merge pull request #154 from layershifter/fix/improve-typings
Browse files Browse the repository at this point in the history
chore: improve typings
  • Loading branch information
Wildhoney committed Jun 29, 2023
2 parents a8a6ecd + acb95a9 commit 0dd9469
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,24 @@ declare module 'react-shadow' {
>;
};

type CreateProxyFn = (
target: unknown,
id: string,
render: ({
children,
}: {
children: React.ReactNode;
ssr: boolean;
root: ShadowRoot;
}) => React.ReactNode,
) => Root;

const createProxy: CreateProxyFn;
const ReactShadowRoot: Root;
const useShadowRoot: () => ShadowRoot;

export default ReactShadowRoot;

export { createProxy, useShadowRoot };
export type { Root };
}

0 comments on commit 0dd9469

Please sign in to comment.