vydimitrov / react-countdown-circle-timer

Lightweight React/React Native countdown timer component with color and progress animation based on SVG

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation error : TS2693: 'string' only refers to a type, but is being used as a value here.

PadBol76 opened this issue · comments

Hello,

Thanks a lot for this module !

We use this module in our project and TS compilation found 4 errors.
You will find the lines concerned below :


type ColorRGBA = `rgba(${string})`

type ColorURL = `url(#${string})`

export declare type ColorRGB = `rgb(${string})`

To resolve the problem in our project we added this in tsconfig.json :

"compilerOptions": {
    ...
    "skipLibCheck": true
}

Best regards.

Hey @PadBol76, what version of TS do you run?

We run it with TS 3.7.3

I see, the template literal type was introduced in v4 so if you upgrade your TS you wont get the error anyl onger.