You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed in VSCode some math functions were not telling me if the returned answer was going to be in radians or degrees, and finally thought I'd set up a PR to add that information. When I dived into the JavaScript I saw that you have actually documented this - Intellisense was never receiving the information because of a subtle difference between JSDoc and TSDoc:
/**
* Find the angle of a segment from (x1, y1) -> (x2, y2).
*
* @function Phaser.Math.Angle.Between
* @since 3.0.0
*
* @param {number} x1 - The x coordinate of the first point.
* @param {number} y1 - The y coordinate of the first point.
* @param {number} x2 - The x coordinate of the second point.
* @param {number} y2 - The y coordinate of the second point.
*
* @return {number} The angle in radians.
*/
in phaser.d.ts this reduces to:
/**
* Find the angle of a segment from (x1, y1) -> (x2, y2).
* @param x1 The x coordinate of the first point.
* @param y1 The y coordinate of the first point.
* @param x2 The x coordinate of the second point.
* @param y2 The y coordinate of the second point.
*/
function Between(x1: number, y1: number, x2: number, y2: number): number;
The text was updated successfully, but these errors were encountered:
I noticed in VSCode some math functions were not telling me if the returned answer was going to be in radians or degrees, and finally thought I'd set up a PR to add that information. When I dived into the JavaScript I saw that you have actually documented this - Intellisense was never receiving the information because of a subtle difference between
JSDoc
andTSDoc
:JSDoc supports
@returns
and allows the alias@return
: https://jsdoc3.vercel.app/tags/returnsTSDoc only supports
@returns
: https://tsdoc.org/pages/tags/returns/in
phaser.d.ts
this reduces to:The text was updated successfully, but these errors were encountered: