From dd7650a44be3d1e5f893b9785ff79ad9e0ba3008 Mon Sep 17 00:00:00 2001 From: Kiiyoko <73446312+Kiiyoko@users.noreply.github.com> Date: Fri, 13 Dec 2024 19:05:56 -0500 Subject: [PATCH] Update generic-constraints.md added extra . for clarity and consistency --- 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 42dcf83..4a98c07 100644 --- a/docs/generic-constraints.md +++ b/docs/generic-constraints.md @@ -23,7 +23,7 @@ local function callbackProperty( object: T, key: keyof, callback: (propert It is impossible to tell whether or not `key` is the same variable being used to index `T` in the callback, and thus Luau infers the type of `property` to be `number | string`. ```luau local function callbackProperty( object: T, key: keyof, callback: (property: index) -> () ) -... +.... ``` This does not work in Luau. > Ideally, this behaviour should work out of the box, but, could be solved with bounded polymorphism.