declared type for onCollideWith

This commit is contained in:
Lukas Dachtler 2024-03-07 00:27:18 +01:00
parent 929267011a
commit f17e1df7f4

16
types/matter.d.ts vendored
View file

@ -469,13 +469,13 @@ declare namespace MatterJS {
onCollideActiveCallback?: Function;
/**
* A collision callback dictionary used by the `Body.setOnCollideWith` function.
* A collision callback dictionary _(body id -> function)_ used by the `Body.setOnCollideWith` function.
*
* @property onCollideWith
* @type object
* @default null
* @type {Object.<number, Function>}
* @default {}
*/
onCollideWith?: any;
onCollideWith?: Record<number, Function>;
}
@ -1953,13 +1953,13 @@ declare namespace MatterJS {
onCollideActiveCallback?: Function;
/**
* A collision callback dictionary used by the `Body.setOnCollideWith` function.
* A collision callback dictionary _(body id -> function)_ used by the `Body.setOnCollideWith` function.
*
* @property onCollideWith
* @type object
* @default null
* @type {Object.<number, Function>}
* @default {}
*/
onCollideWith?: any;
onCollideWith?: Record<number, Function>;
/**
* Sets the onCollideWith callback.