File tree Expand file tree Collapse file tree 9 files changed +12
-8
lines changed
anchor/src/generated/programs
dummy/src/generated/programs
system/src/generated/programs
token/src/generated/programs Expand file tree Collapse file tree 9 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @codama/renderers-js ' : patch
3+ ---
4+
5+ Cast in template expression to not break eslint rule
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ export default defineConfig([
1111 '@typescript-eslint/sort-type-constituents' : 'off' ,
1212 '@typescript-eslint/no-unnecessary-type-assertion' : 'off' ,
1313 '@typescript-eslint/no-empty-object-type' : 'off' ,
14- '@typescript-eslint/restrict-template-expressions' : 'off' ,
1514 'simple-import-sort/imports' : 'off' ,
1615 'sort-keys-fix/sort-keys-fix' : 'off' ,
1716 'typescript-sort-keys/interface' : 'off' ,
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ function getProgramInstructionsParseFunctionFragment(
167167 const instructionType = ${ programInstructionsIdentifierFunction } (instruction);
168168 switch (instructionType) {
169169 ${ switchCases }
170- default: throw new Error(\`Unrecognized instruction type: \${instructionType}\`);
170+ default: throw new Error(\`Unrecognized instruction type: \${instructionType as string }\`);
171171 }
172172 }` ;
173173}
Original file line number Diff line number Diff line change @@ -137,6 +137,6 @@ export function parseWenTransferGuardInstruction<TProgram extends string>(
137137 } ;
138138 }
139139 default :
140- throw new Error ( `Unrecognized instruction type: ${ instructionType } ` ) ;
140+ throw new Error ( `Unrecognized instruction type: ${ instructionType as string } ` ) ;
141141 }
142142}
Original file line number Diff line number Diff line change @@ -93,6 +93,6 @@ export function parseDummyInstruction<TProgram extends string>(
9393 return { instructionType : DummyInstruction . Instruction7 , ...parseInstruction7Instruction ( instruction ) } ;
9494 }
9595 default :
96- throw new Error ( `Unrecognized instruction type: ${ instructionType } ` ) ;
96+ throw new Error ( `Unrecognized instruction type: ${ instructionType as string } ` ) ;
9797 }
9898}
Original file line number Diff line number Diff line change @@ -214,6 +214,6 @@ export function parseSystemInstruction<TProgram extends string>(
214214 } ;
215215 }
216216 default :
217- throw new Error ( `Unrecognized instruction type: ${ instructionType } ` ) ;
217+ throw new Error ( `Unrecognized instruction type: ${ instructionType as string } ` ) ;
218218 }
219219}
Original file line number Diff line number Diff line change @@ -87,6 +87,6 @@ export function parseAssociatedTokenInstruction<TProgram extends string>(
8787 } ;
8888 }
8989 default :
90- throw new Error ( `Unrecognized instruction type: ${ instructionType } ` ) ;
90+ throw new Error ( `Unrecognized instruction type: ${ instructionType as string } ` ) ;
9191 }
9292}
Original file line number Diff line number Diff line change @@ -47,6 +47,6 @@ export function parseSystemInstruction<TProgram extends string>(
4747 return { instructionType : SystemInstruction . CreateAccount , ...parseCreateAccountInstruction ( instruction ) } ;
4848 }
4949 default :
50- throw new Error ( `Unrecognized instruction type: ${ instructionType } ` ) ;
50+ throw new Error ( `Unrecognized instruction type: ${ instructionType as string } ` ) ;
5151 }
5252}
Original file line number Diff line number Diff line change @@ -369,6 +369,6 @@ export function parseTokenInstruction<TProgram extends string>(
369369 } ;
370370 }
371371 default :
372- throw new Error ( `Unrecognized instruction type: ${ instructionType } ` ) ;
372+ throw new Error ( `Unrecognized instruction type: ${ instructionType as string } ` ) ;
373373 }
374374}
You can’t perform that action at this time.
0 commit comments