From 9bab1845fdb34b3fccf64cfafbfdac3a682f8fce Mon Sep 17 00:00:00 2001 From: Josh Ellis Date: Thu, 7 Jan 2021 10:55:40 +0000 Subject: [PATCH] change: move RenderHookOptions into types/index --- src/core/index.ts | 4 ++-- src/types/index.ts | 6 ++++-- src/types/internal.ts | 4 ---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/core/index.ts b/src/core/index.ts index 068016f5..6f8f5809 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,5 +1,5 @@ -import { CreateRenderer, Renderer, RenderResult, RenderHook } from '../types' -import { ResultContainer, RenderHookOptions } from '../types/internal' +import { CreateRenderer, Renderer, RenderResult, RenderHook, RenderHookOptions } from '../types' +import { ResultContainer } from '../types/internal' import asyncUtils from './asyncUtils' import { cleanup, addCleanup, removeCleanup } from './cleanup' diff --git a/src/types/index.ts b/src/types/index.ts index 90885b20..d9fce828 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,5 +1,3 @@ -import { RenderHookOptions } from './internal' - export type Renderer = { render: (props?: TProps) => void rerender: (props?: TProps) => void @@ -60,6 +58,10 @@ export interface ReactHooksRenderer { removeCleanup: (callback: () => Promise | void) => void } +export type RenderHookOptions = TOptions & { + initialProps?: TProps +} + export interface Act { (callback: () => void | undefined): void (callback: () => Promise): Promise diff --git a/src/types/internal.ts b/src/types/internal.ts index 3d1a4152..324e8268 100644 --- a/src/types/internal.ts +++ b/src/types/internal.ts @@ -6,7 +6,3 @@ export type ResultContainer = { setValue: (val: TValue) => void setError: (error: Error) => void } - -export type RenderHookOptions = TOptions & { - initialProps?: TProps -}