TS2345: Argument of type '"PathBuilder"' is not assignable to parameter of type 'boolean'.
The TypeScript compiler is in fact right to complain, as the third parameter to the plugin() function is the boolean start.
Phaser 3 will perhaps just interpret it as true-ish, so that may be okay for non-TypeScript users.
I guess the reason for this problem is that the Phaser 3 API was different in the past, so perhaps doing something like this may be more forwards compatible, as it is independent of the order of arguments:
This Issue is about
Latest Phaser version: 3.55.2 Latest master/PathBuilder: https://raw.githubusercontent.com/samid737/phaser3-plugin-pathbuilder/master/dist/PathBuilder.js
Describe the Issue below:
The following, as documented in the README does not compile in TypeScript:
The error I get is:
The TypeScript compiler is in fact right to complain, as the third parameter to the plugin() function is the boolean
start
.Phaser 3 will perhaps just interpret it as true-ish, so that may be okay for non-TypeScript users.
I guess the reason for this problem is that the Phaser 3 API was different in the past, so perhaps doing something like this may be more forwards compatible, as it is independent of the order of arguments:
(Not sure if "mapping" is what you had in mind for the third argument)