Skip to content

Commit 40a55bf

Browse files
authored
fix(5.0): missing not nil constraint (#76)
1 parent f08232c commit 40a55bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/5.0/global.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ declare function next(table: object, index?: any): LuaMultiReturn<[any, any] | [
102102
* See function next for the caveats of modifying the table during its
103103
* traversal.
104104
*/
105-
declare function pairs<TKey, TValue>(
105+
declare function pairs<TKey extends AnyNotNil, TValue>(
106106
t: LuaTable<TKey, TValue>
107107
): LuaIterable<LuaMultiReturn<[TKey, NonNullable<TValue>]>>;
108108
declare function pairs<T>(t: T): LuaIterable<LuaMultiReturn<[keyof T, NonNullable<T[keyof T]>]>>;

0 commit comments

Comments
 (0)