Skip to content

Commit

Permalink
Fixed type reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei15193 committed Jan 29, 2025
1 parent d8136db commit 53c4cb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dependencies/DependencyResolverContext.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { IDependencyContainer, ConfigurableDependency } from './IDependencyContainer';
import type { IDependencyResolver, ResolvableSimpleDependency } from './IDependencyResolver';
import type { useDependency } from './UseDependency';
import { type PropsWithChildren, createContext, createElement, useContext, useMemo, useRef } from 'react';
import { type ReactElement, type PropsWithChildren, createContext, createElement, useContext, useRef } from 'react';
import { DependencyContainer } from './DependencyContainer';

const DependencyResolverContext = createContext<IDependencyResolver>(new DependencyContainer());
Expand Down Expand Up @@ -44,7 +44,7 @@ export interface IDependencyResolverProviderProps {
* @see {@link IDependencyContainer}
* @see {@link useDependency}
*/
export function DependencyResolverProvider(props: PropsWithChildren<IDependencyResolverProviderProps>): JSX.Element {
export function DependencyResolverProvider(props: PropsWithChildren<IDependencyResolverProviderProps>): ReactElement {
const { dependencyResolver, children } = props;

return createElement(DependencyResolverContext.Provider, {
Expand Down Expand Up @@ -75,7 +75,7 @@ const emptyDeps: readonly any[] = [];
* @see {@link IDependencyContainer}
* @see {@link useDependency}
*/
export function DependencyResolverScope({ deps, children }: PropsWithChildren<IDependencyResolverScopeProps>): JSX.Element {
export function DependencyResolverScope({ deps, children }: PropsWithChildren<IDependencyResolverScopeProps>): ReactElement {
const normalizedDeps = deps === null || deps === undefined || !Array.isArray(deps) || deps.length === 0
? emptyDeps
: deps;
Expand Down
3 changes: 3 additions & 0 deletions webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,9 @@ ${this._getReferences(functionSignature)}
case 'DependencyList':
return 'https://react.dev/learn/removing-effect-dependencies#dependencies-should-match-the-code';

case 'ReactElement':
return 'react.dev/reference/react/createElement';

case 'JSX.Element':
return 'https://react.dev/learn/writing-markup-with-jsx';

Expand Down

0 comments on commit 53c4cb5

Please sign in to comment.