Flagsmith / flagsmith-js-client

Javascript Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
https://www.flagsmith.com/
BSD 3-Clause "New" or "Revised" License
60 stars 38 forks source link

error TS2304: Cannot find name 'bool' #178

Closed ldgrp closed 1 year ago

ldgrp commented 1 year ago

The type definition file for flagsmith 3.19.0 appears to have a typo.

https://github.com/Flagsmith/flagsmith-js-client/blob/b4d93c7a048c9c5c68e7b76185902ff273685f1f/types.d.ts#L61-L62

Running tsc on a project with flagsmith 3.19.0 produces the following error

$ tsc -noEmit
node_modules/flagsmith/types.d.ts:61:17 - error TS2304: Cannot find name 'bool'.

61     isFetching: bool, // Whether there is a current request to fetch server flags
                   ~~~~

node_modules/flagsmith/types.d.ts:62:16 - error TS2304: Cannot find name 'bool'.

62     isLoading: bool,  // Whether any flag data exists
                  ~~~~

Reproduction: https://codesandbox.io/p/sandbox/condescending-bash-wcrgm5