blockworks-foundation / mango-v4

mango-v4 monorepo, contains program, ts client, and py client
Other
84 stars 49 forks source link

type error #544

Closed 0x4ka5h closed 1 year ago

0x4ka5h commented 1 year ago

$npm run build

node_modules/@blockworks-foundation/mango-v4/dist/types/src/utils.d.ts:32:13 - error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type.

32 private [As.$as$];


node_modules/@switchboard-xyz/sbv2-lite/node_modules/@project-serum/anchor/dist/cjs/program/namespace/types.d.ts:94:11 - error TS2322: Type 'FieldsOfType<I>["name"]' is not assignable to type 'string | number | symbol'.

94     [F in FieldsOfType<I>["name"]]: DecodeType<(FieldsOfType<I> & {

node_modules/@switchboard-xyz/sbv2-lite/node_modules/@project-serum/anchor/dist/cjs/program/namespace/types.d.ts:94:11 - error TS2536: Type '"name"' cannot be used to index type 'FieldsOfType'.

94 [F in FieldsOfType["name"]]: DecodeType<(FieldsOfType & {


node_modules/@switchboard-xyz/sbv2-lite/node_modules/@project-serum/anchor/dist/cjs/program/namespace/types.d.ts:94:48 - error TS2344: Type 'FieldsOfType<I>["type"]' does not satisfy the constraint 'IdlType'.

94     [F in FieldsOfType<I>["name"]]: DecodeType<(FieldsOfType<I> & {

95 name: F;

96     })["type"], Defined>;

node_modules/@switchboard-xyz/sbv2-lite/node_modules/@project-serum/anchor/dist/cjs/program/namespace/types.d.ts:94:48 - error TS2536: Type '"type"' cannot be used to index type 'FieldsOfType & { name: F; }'.

94 [F in FieldsOfType["name"]]: DecodeType<(FieldsOfType & {

95         name: F;

96 })["type"], Defined>;



Found 5 errors in 2 files.

Errors  Files
     1  node_modules/@blockworks-foundation/mango-v4/dist/types/src/utils.d.ts:32
     4  node_modules/@switchboard-xyz/sbv2-lite/node_modules/@project-serum/anchor/dist/cjs/program/namespace/types.d.ts:94
microwavedcola1 commented 1 year ago

yarn build is how we build the ts package for mango-v4, and it runs through without any errors, closing this.