Преглед на файлове

fix: add ts-expect-error for BNLayout super() type mismatch

LayoutConstructor binds span param to generic T (BN), but runtime
span is correctly a number. Same pattern already used in WideBits,
WrappedLayout, and OptionLayout in the same file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
zhangchunrui преди 2 седмици
родител
ревизия
4fa48f8c6b
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      src/lib/clmm-sdk/src/instructions/libs/marshmallow/index.ts

+ 1 - 0
src/lib/clmm-sdk/src/instructions/libs/marshmallow/index.ts

@@ -24,6 +24,7 @@ export class BNLayout<P extends string = ''> extends Layout<BN, P> {
   signed: boolean;
 
   constructor(span: number, signed: boolean, property?: P) {
+    //@ts-expect-error type wrong for super()'s type different from extends , but it desn't matter
     super(span, property);
     this.blob = blob(span);
     this.signed = signed;