-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Description
As far as I can tell, this is the exact same reasoning as .includes (and may belong in the same entrypoint)? Happy to open a PR depending on your feedback.
Example:
// BEFORE
const users = ["matt", "sofia", "waqas"] as const;
// Argument of type '"bryan"' is not assignable to
// parameter of type '"matt" | "sofia" | "waqas"'.
users.indexOf("bryan");// AFTER
import "@total-typescript/ts-reset/array-indexof"; // or array-includes?
const users = ["matt", "sofia", "waqas"] as const;
// .indexOf now takes a string as the first parameter
users.indexOf("bryan")Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels