kaplay icon indicating copy to clipboard operation
kaplay copied to clipboard

bug: Codeblocks are not closed, BinaryData is removed

Open lajbel opened this issue 8 months ago • 3 comments

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

lajbel avatar Apr 13 '25 13:04 lajbel

wasn't this fixed in #732 or was that a partial PR

dragoncoder047 avatar Apr 27 '25 18:04 dragoncoder047

Needs repro

lajbel avatar Apr 27 '25 22:04 lajbel

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

mflerackers avatar May 17 '25 23:05 mflerackers

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;
}

bobrosoft avatar Jul 29 '25 20:07 bobrosoft