diff --git a/.eslintrc b/.eslintrc index 8d3838a..eb9fdd0 100644 --- a/.eslintrc +++ b/.eslintrc @@ -18,6 +18,22 @@ "react-hooks", "jest" ], + "overrides": [ + { + "files": [ + "src/**/*.ts", + "src/**/*.tsx" + ], + "parserOptions": { + "project": [ + "./tsconfig.json" + ] + }, + "rules": { + "@typescript-eslint/consistent-type-exports": "error" + } + } + ], "rules": { "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/ban-ts-comment": "off", @@ -38,4 +54,4 @@ "globals": { "JSX": true } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 78871ab..765bce4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-with-hoc", - "version": "0.0.23-wip034", + "version": "0.0.23-wip035", "description": "Work with React and HOCs (Higher-Order Components)", "keywords": [ "higher-order", diff --git a/src/index.tsx b/src/index.tsx index 43ad13e..80df514 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -18,8 +18,8 @@ export { withState } from "./hocs/withState"; export { withWrapper } from "./hocs/withWrapper"; // Types -export { DependencyNames } from "./types/DependencyNames"; -export { +export type { DependencyNames } from "./types/DependencyNames"; +export type { Call, Fn, FromSchema, @@ -37,19 +37,15 @@ export { ToSchema, UnionFn, } from "./types/Fn"; -export { Hoc } from "./types/Hoc"; -export { PartialComponent } from "./types/PartialComponent"; +export type { Hoc } from "./types/Hoc"; +export type { PartialComponent } from "./types/PartialComponent"; // Utils export { componentDisplayName } from "./utils/componentDisplayName"; +export type { HocNameFactory } from "./utils/hocNameForWithStyle"; export { - HocNameFactory, createHocNameFunction, defaultHocName, } from "./utils/hocNameForWithStyle"; -export { - GetHocArgs, - HocDefinition, - NewHocReturn, - newHoc, -} from "./utils/newHoc"; +export type { GetHocArgs, HocDefinition, NewHocReturn } from "./utils/newHoc"; +export { newHoc } from "./utils/newHoc";