nvk icon indicating copy to clipboard operation
nvk copied to clipboard

Issue with BigUint64Array

Open kalysti opened this issue 3 years ago • 0 comments

Issue on typescript by using the following lines:

   ` var arr =  new BigUint64Array([BigInt(0)]);
      vkCmdBindVertexBuffers(cmdBuffer, 0, 1, [uploadBuffer.vertexBuffer],arr);`
   
       

Thats the error

`error TS2345: Argument of type 'BigUint64Array' is not assignable to parameter of type 'Float32Array'. Types of property 'every' are incompatible. Type '(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any) => boolean' is not assignable to type '(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any) => boolean'. Types of parameters 'predicate' and 'predicate' are incompatible. Types of parameters 'value' and 'value' are incompatible. Type 'bigint' is not assignable to type 'number '.

Thats the lines in the index.d.ts of nvk:

type BigUint64Array = Float32Array declare const BigUint64Array: typeof Float32Array export function vkCmdBindVertexBuffers(commandBuffer: VkCommandBuffer | null, firstBinding: number, bindingCount: number, pBuffers: VkBuffer[] | null, pOffsets: BigUint64Array | null): void;

Somebody have an idea or can help me with this issue?

kalysti avatar Jul 04 '21 23:07 kalysti