hey icon indicating copy to clipboard operation
hey copied to clipboard

(JS-0323) Detected usage of the `any` type

Open bigint opened this issue 1 year ago • 5 comments

Description

The any type can sometimes leak into your codebase. TypeScript compiler skips the type checking of the any typed variables, so it creates a potential safety hole, and source of bugs in your codebase. We recommend using unknown or never type variable.

Occurrences

There are 60 occurrences of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/lensterxyz/lenster/issue/JS-0323/occurrences/

Also need to fix this https://github.com/lensterxyz/lenster/issues/116

bigint avatar Jul 24 '22 05:07 bigint

Rather than using the any or never type, can we create Lenster types for this? Something like in the screenshot

@bigint

Screenshot 2022-07-27 at 14 54 35

jelilat avatar Jul 27 '22 13:07 jelilat

@jelilat I don't think so, that file is to add only custom types, but in this case we don't want custom types in all places 🙇🏻

bigint avatar Jul 29 '22 03:07 bigint

Hey , we have to just rename the any with unknown ?

adarshzpatel avatar Aug 18 '22 23:08 adarshzpatel

Hey @adarshzpatel no, we need to use proper types 🙇🏼

bigint avatar Aug 19 '22 03:08 bigint

@bigint I have removed some any notation (still remain some API Level need to be removed), can you give me some review of it?

#537

izayl avatar Aug 25 '22 06:08 izayl

This issue has been locked since it has been closed for more than 10 days.

If you found a concrete bug or regression related to it, please open a new bug report.

github-actions[bot] avatar Jan 07 '24 15:01 github-actions[bot]