Ver código fonte

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 semanas atrás
pai
commit
4fa48f8c6b

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