launchdarkly / js-sdk-common

Code shared between all LaunchDarkly client-side JS-based SDKs
Other
4 stars 27 forks source link

Use `unknown` instead of `any` #95

Closed josephearl closed 1 year ago

josephearl commented 1 year ago

Is your feature request related to a problem? Please describe.

Now the SDK has been converted to TypeScript, it should not use any anymore.

Use of any causes problems for library consumers that use TypeScript in strict mode, as well as errors from the recommended set of TypeScript ESLint rules like https://typescript-eslint.io/rules/no-explicit-any/.

any is an escape hatch that disables type checking and allows you to access arbitrary properties, even ones that don’t exist.

Describe the solution you'd like

Use unknown instead of any. This would be a breaking change so would require a major version bump following SemVer.

josephearl commented 1 year ago

Moved to the new repo https://github.com/launchdarkly/js-core/issues/286