Comparing version 2.6.0 to 2.6.1
@@ -195,3 +195,6 @@ // Based on https://www.lua.org/manual/5.3/manual.html#6.10 | ||
*/ | ||
function setmetatable<T>(value: T, table: LuaMetatable<T> | null | undefined): T; | ||
function setmetatable<T, TIndex>( | ||
value: T, | ||
table: LuaMetatable<T & TIndex, TIndex> | null | undefined, | ||
): T & TIndex; | ||
@@ -198,0 +201,0 @@ /** |
@@ -248,6 +248,6 @@ // Based on https://www.lua.org/manual/5.3/manual.html#6.1 | ||
*/ | ||
declare function setmetatable<T extends object>( | ||
declare function setmetatable<T extends object, TIndex extends object>( | ||
table: T, | ||
metatable: LuaMetatable<T> | null | undefined, | ||
): T; | ||
metatable: LuaMetatable<T & TIndex, TIndex> | null | undefined, | ||
): T & TIndex; | ||
@@ -254,0 +254,0 @@ /** |
@@ -80,4 +80,5 @@ // Based on https://www.lua.org/manual/5.3/manual.html#6.7 | ||
* result is always a float. | ||
* @tupleReturn | ||
*/ | ||
function modf(x: number): number; | ||
function modf(x: number): [number, number]; | ||
@@ -84,0 +85,0 @@ /** |
// Based on https://www.lua.org/manual/5.3/manual.html#2.4 | ||
interface LuaMetatable<T> { | ||
interface LuaMetatable<T, TIndex = object> { | ||
/** | ||
@@ -105,3 +105,3 @@ * the addition (+) operation. If any operand for an addition is not a number | ||
*/ | ||
__index?: object | ((this: T, key: any, value: any) => any); | ||
__index?: TIndex | ((this: T, key: any, value: any) => any); | ||
@@ -108,0 +108,0 @@ /** |
@@ -60,3 +60,8 @@ // Based on https://www.lua.org/manual/5.3/manual.html#6.4 | ||
*/ | ||
function find(s: string, pattern: string, init?: number, plain?: boolean): [number, number] | []; | ||
function find( | ||
s: string, | ||
pattern: string, | ||
init?: number, | ||
plain?: boolean, | ||
): [number, number, ...string[]] | []; | ||
@@ -63,0 +68,0 @@ /** |
{ | ||
"name": "lua-types", | ||
"version": "2.6.0", | ||
"version": "2.6.1", | ||
"description": "TypeScript definitions for Lua standard library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122420
2828