Skip to content

Commit ad475f6

Browse files
GlassBricksPerryvw
andauthored
Make pairs return non-nullable values for LuaTable iteration too (#35)
* Make pairs and ipairs return non-nullable values * Fix prettier formatting * Make pairs return non-nullable values for LuaTable Co-authored-by: Benjamin Ye <[email protected]> Co-authored-by: Perry van Wesel <[email protected]>
1 parent 59f9cfa commit ad475f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/global.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ declare function next(table: object, index?: any): LuaMultiReturn<[any, any] | [
161161
*/
162162
declare function pairs<TKey, TValue>(
163163
t: LuaTable<TKey, TValue>
164-
): LuaIterable<LuaMultiReturn<[TKey, TValue]>>;
164+
): LuaIterable<LuaMultiReturn<[TKey, NonNullable<TValue>]>>;
165165
declare function pairs<T>(t: T): LuaIterable<LuaMultiReturn<[keyof T, NonNullable<T[keyof T]>]>>;
166166

167167
/**

0 commit comments

Comments
 (0)