We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently isObject returns the type boolean, but i think it would improve the package if it returned val is { [key: string]: unknown }.
boolean
val is { [key: string]: unknown }
const test: { example: "hello" } | string[] = ...; if(isObject(test)) { test.example = "world" // Error since test could be a string array }
const test: { example: "hello" } | string[] = ...; if(isObject(test)) { test.example = "world" // No error }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Summary
Currently isObject returns the type
boolean
, but i think it would improve the package if it returnedval is { [key: string]: unknown }
.Current behaviour
Improved behaviour
The text was updated successfully, but these errors were encountered: