Skip to content

Correctly set type of parameter of setInvalidatedByBiometricEnrollment#154

Merged
mCodex merged 1 commit intomCodex:masterfrom
thabemmz:feature/fix-type-definition
Jul 3, 2019
Merged

Correctly set type of parameter of setInvalidatedByBiometricEnrollment#154
mCodex merged 1 commit intomCodex:masterfrom
thabemmz:feature/fix-type-definition

Conversation

@thabemmz
Copy link
Copy Markdown

@thabemmz thabemmz commented Jul 2, 2019

Context

While running a react native project in Typescript with this library included, I ran into the following Typescript issue:

node_modules/react-native-sensitive-info/index.d.ts:65:61 - error TS7006: Parameter 'boolean' implicitly has an 'any' type.

65 export declare function setInvalidatedByBiometricEnrollment(boolean): void;

This was caused by the fact that in the type definition above, boolean is the name of the parameter (while it probably was intended to be the type of the parameter).

What has been done?

  • Give the parameter of setInvalidatedByBiometricEnrollment an explicit name and type it

How to test?

  • Include this file in a typescript project
  • See no error

Copy link
Copy Markdown
Owner

@mCodex mCodex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, mate! 😄

@mCodex mCodex merged commit 580aa9d into mCodex:master Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants