bug: Codeblocks are not closed, BinaryData is removed
Bug Description
Basically there is some codeblocks in JSDoc comments that are not closed.
- KAPLAYCtx.get()
- KAPLAYCtx.loadHappy()
- KAPLAYCtx.scene()
- KAPLAYCtx.addKaboom()
- KAPLAYCtx.layer()
After they being closed, parsers will work correctly.
Also, the union type BinaryData seems removed in latest TypeScript versions, so for start migrating, we should replace it
Version
3001.0.12
Playground Link
No response
Extra information
No response
Summary
- [x] Fixed in v4000
- [x] Fixed in v3001
wasn't this fixed in #732 or was that a partial PR
Needs repro
src/assets/font.ts(97,19): error TS2304: Cannot find name 'BinaryData'. src/kaplay.ts(107,31): error TS2345: Argument of type 'ArrayBuffer | SharedArrayBuffer' is not assignable to parameter of type 'ArrayBuffer'. Type 'SharedArrayBuffer' is missing the following properties from type 'ArrayBuffer': resizable, resize, detached, transfer, transferToFixedLength
Having the same issue with BinaryData. Atm solved with custom definitions extending.
custom-definitions.d.ts
export {};
declare global {
// Fix for ERROR(TypeScript) Cannot find name 'BinaryData'.
type BinaryData =
| ArrayBuffer
| SharedArrayBuffer
| ArrayBufferView
| DataView
| Blob
| Uint8Array;
}