Closed nriin-oji closed 2 years ago
Where do you use the types from? https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-date-range/index.d.ts#L289 ? Because that one is outdated as far as I know
@kamyar I was using that one
any update regarding this @kamyar @nriin-oji ? i have same problem.
any update regarding this @kamyar @nriin-oji ? i have same problem.
I copied original type then create new type in global.d.ts and adjust the DefinedRange type to
export class DefinedRange extends React.Component<DefinedRangeProps> {}
Subject of the issue
'DefinedRange' only refers to a type, but is being used as a value here.
Although this issue exists, it does not break the code. yet it trigger the linter. My temporary solution is duplicate existing types then re-create on new global.d.ts file[BUG] Bug Reproduce Steps
I just following the instruction based on this page
[BUG] Expected behaviour
Import the DefinedRange without issue
Environment
Package Version: 1.2.0 React version: 16.12.0 Typescript version: 4.2.4 Node version: 12.0.0 Browser: Chrome 91.0.4472.101