Skip to content

Conversation

andyb1979
Copy link
Collaborator

Fixes various errors

C:\dev\SciChart.JS.Examples\Examples\src\components\Examples\FeaturedApps\ScientificCharts\AudioAnalyzerBars\AudioDataProvider.ts(104,49) 
TS2345: Argument of type 'Uint8Array<ArrayBufferLike>' is not assignable to parameter of type 'Uint8Array<ArrayBuffer>'.
  Type 'ArrayBufferLike' is not assignable to type 'ArrayBuffer'. 
  Type 'SharedArrayBuffer' is not assignable to type 'ArrayBuffer'. 
  Types of property '[Symbol.toStringTag]' are incompatible. 
  Type '"SharedArrayBuffer"' is not assignable to type '"ArrayBuffer"'.

This issue was caused by this line of code
this.analyserNode.getByteTimeDomainData(this.freqByteData);

getByteTimeDomainData(array: Uint8Array<ArrayBuffer>): void; is defined in lib.dom.d.ts freqByteData is type Uint8Array

One solution is to cast the freqByteData e.g.

this.analyserNode.getByteTimeDomainData(this.freqByteData as unknown as Uint8Array<ArrayBuffer>);

however a ts-ignore works just as well

… compilation error on some computers (ARM64)
Copy link

codesandbox bot commented Sep 18, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant