Closed mflerackers closed 1 week ago
The current function signature is
getSprite(name: string): Asset<SpriteData> | void
Which looks invalid, a function either returns something, or not, you can't have both. This causes problems when writing either of these
getSprite("bean").then() getSprite("bean")?.then()
Since in the case of void nothing gets returned, so ? doesn't solve anything. The correct function signature would be
getSprite(name: string): Asset<SpriteData> | null
It's true
fixed 1f52c92
The current function signature is
Which looks invalid, a function either returns something, or not, you can't have both. This causes problems when writing either of these
Since in the case of void nothing gets returned, so ? doesn't solve anything. The correct function signature would be