From ad231459cc31929d4a0fde0917d9a6e7eb979714 Mon Sep 17 00:00:00 2001 From: Kiiyoko <73446312+Kiiyoko@users.noreply.github.com> Date: Thu, 12 Dec 2024 23:15:34 -0500 Subject: [PATCH] Update generic-constraints.md fixed grammar! --- docs/generic-constraints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/generic-constraints.md b/docs/generic-constraints.md index 0d1d821..daad262 100644 --- a/docs/generic-constraints.md +++ b/docs/generic-constraints.md @@ -58,4 +58,4 @@ local function callbackProperty( object: T, key: K, callback: (i - Adding an extra use to `&` could make its usage more confusing to novices. ## Alternatives - Don't do this; this would make it impossible for functions like above to be able to be inferred correctly. Just let people explicitly type their variables instead of inferring types. This makes code more verbose and would likely not allow for full optimization. -- Use overloaded functions as previously mentioned, but this wouldn't allow the usage of a generic with correct type inference and would require users to add a new overload for each key. +- Use overloaded functions as previously mentioned, but this wouldn't allow the usage of a generic, would require users to add a new overload for each key.