Closed dsernst closed 2 years ago
Most of the .setYY() methods return this to support chaining. E.g.:
.setYY()
return this
And the readme describes this behavior:
You may chain non-getter calls, for example, sound.setVolume(.5).setPan(.5).play().
sound.setVolume(.5).setPan(.5).play()
But the current type definitions say most of these functions return void, which causes TypeScript to yell at you if you try to chain.
void
This PR updates the type definitions to fix this, and properly reflect that these functions are returning this.
this
Most of the
.setYY()
methodsreturn this
to support chaining. E.g.:And the readme describes this behavior:
But the current type definitions say most of these functions return
void
, which causes TypeScript to yell at you if you try to chain.This PR updates the type definitions to fix this, and properly reflect that these functions are returning
this
.