Update generic-constraints.md

fixed a code error
This commit is contained in:
Kiiyoko 2024-12-12 23:25:48 -05:00 committed by GitHub
parent 60032131e2
commit e29d515a27
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -44,7 +44,7 @@ local function callbackProperty<T, K & keyof<T>>( object: T, key: K, callback: (
callback( object[key] )
end
callbackProperty( object, "foo", function( foo )
callbackProperty( qux, "foo", function( foo )
-- foo: number -- this is expected!
end)
```