Skip to content

Commit

Permalink
refactor(type): consistent-type-imports
Browse files Browse the repository at this point in the history
  • Loading branch information
wangcch committed Apr 10, 2021
1 parent 7ffe2a0 commit 84eec7d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/useDeepEffect.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect, EffectCallback, DependencyList } from "react";
import type { EffectCallback, DependencyList } from "react";
import { useEffect } from "react";
import useDeepCompareCache from "./useDeepCompareCache";

/**
Expand Down
9 changes: 2 additions & 7 deletions src/useLoadImg.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import React, {
CSSProperties,
useState,
useEffect,
useMemo,
useCallback,
} from "react";
import type { CSSProperties } from "react";
import React, { useState, useEffect, useMemo, useCallback } from "react";
import useDeepCompareCache from "./useDeepCompareCache";

export type EImgState = "loading" | "done" | "error" | "idle";
Expand Down
4 changes: 2 additions & 2 deletions src/useThrottle.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
useThrottle,
import type {
ThrottleOptions,
ControlFunctions,
} from "@react-cmpt/use-throttle";
import { useThrottle } from "@react-cmpt/use-throttle";

export type { ThrottleOptions, ControlFunctions };

Expand Down
4 changes: 2 additions & 2 deletions src/useThrottleFn.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
useThrottleFn,
import type {
ThrottleFnOptions,
ThrottleReturnResult,
} from "@react-cmpt/use-throttle";
import { useThrottleFn } from "@react-cmpt/use-throttle";

export type { ThrottleFnOptions, ThrottleReturnResult };

Expand Down
3 changes: 2 additions & 1 deletion src/useUpdateEffect.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect, EffectCallback, DependencyList, useRef } from "react";
import type { EffectCallback, DependencyList } from "react";
import { useEffect, useRef } from "react";

/**
* useUpdateEffect
Expand Down

0 comments on commit 84eec7d

Please sign in to comment.