mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-05-04 10:43:48 +01:00
Update type-implicit-table-generics.md
This commit is contained in:
parent
b33c150ecf
commit
cc66d53381
1 changed files with 2 additions and 2 deletions
|
@ -17,11 +17,11 @@ At an application level, the current workaround for this is to wrap the table in
|
||||||
local foo = {} :: { [F<any>]: G<any> }
|
local foo = {} :: { [F<any>]: G<any> }
|
||||||
|
|
||||||
-- public
|
-- public
|
||||||
local function <T>getFoo(k: F<T>): G<T>
|
local function getFoo<T>(k: F<T>): G<T>
|
||||||
return foo[k]
|
return foo[k]
|
||||||
end
|
end
|
||||||
|
|
||||||
local function <T>setFoo(k: F<T>, v: G<T>)
|
local function setFoo<T>(k: F<T>, v: G<T>)
|
||||||
foo[k] = v
|
foo[k] = v
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue