-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Summary
Currently isObject returns the type boolean, but i think it would improve the package if it returned val is { [key: string]: unknown }.
Current behaviour
const test: { example: "hello" } | string[] = ...;
if(isObject(test)) {
test.example = "world" // Error since test could be a string array
}Improved behaviour
const test: { example: "hello" } | string[] = ...;
if(isObject(test)) {
test.example = "world" // No error
}asplunds and nickluger
Metadata
Metadata
Assignees
Labels
No labels