瀏覽代碼

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;