From 6ca0dc4754fa119e93c9dd1045c9bdeeaf59003d Mon Sep 17 00:00:00 2001 From: Maksim Markelov Date: Mon, 18 Mar 2024 17:25:06 +0300 Subject: [PATCH] Fix types and build process (#851) * Fix startOnMount types * Rollback build process --- package.json | 10 +++------- src/types.ts | 1 + src/useCountUp.ts | 1 - 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index f257f8f1..726366da 100644 --- a/package.json +++ b/package.json @@ -18,14 +18,10 @@ "url": "https://github.com/glennreyes/react-countup/issues" }, "homepage": "https://react-countup.now.sh", - "main": "build/index.js", - "exports": { - "import": "./build/index.mjs", - "require": "./build/index.js", - "types": "./build/index.d.ts" - }, + "main": "build", "files": [ - "build" + "build/index.js", + "build/index.d.ts" ], "typings": "build/index.d.ts", "scripts": { diff --git a/src/types.ts b/src/types.ts index e05cc9ed..ff4037ef 100644 --- a/src/types.ts +++ b/src/types.ts @@ -56,6 +56,7 @@ export interface CountUpInstanceProps extends CountUpOptions { } export interface CommonProps extends CountUpInstanceProps { + startOnMount?: boolean; delay?: number | null; } diff --git a/src/useCountUp.ts b/src/useCountUp.ts index bda59d3d..1ef3b233 100644 --- a/src/useCountUp.ts +++ b/src/useCountUp.ts @@ -11,7 +11,6 @@ import { useEventCallback } from './helpers/useEventCallback'; import { CountUp as CountUpJs } from 'countup.js'; export interface UseCountUpProps extends CommonProps, CallbackProps { - startOnMount?: boolean; ref: string | React.RefObject; enableReinitialize?: boolean; }