Skip to content

Commit

Permalink
fix: export interfaces in typegen (#2843)
Browse files Browse the repository at this point in the history
* fix: export interfaces in typegen

* chore: add changeset

---------

Co-authored-by: deficake <rafael.rodriguez@taringa.net>
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
  • Loading branch information
3 people authored Jul 27, 2024
1 parent 34de0c7 commit ad9adcd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/three-candles-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fuel-ts/abi-typegen": patch
---

fix: export interfaces in typegen
2 changes: 1 addition & 1 deletion packages/abi-typegen/src/templates/contract/dts.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export type {{capitalizedName}}Configurables = Partial<{
}>;
{{/if}}

interface {{capitalizedName}}Interface extends Interface {
export interface {{capitalizedName}}Interface extends Interface {
functions: {
{{#each functionsFragments}}
{{this}}: FunctionFragment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type MyContractAbiConfigurables = Partial<{
SHOULD_RETURN: boolean;
}>;

interface MyContractAbiInterface extends Interface {
export interface MyContractAbiInterface extends Interface {
functions: {
main: FunctionFragment;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export type MyStructOutput = { x: number, y: number, state: MyEnumOutput };
export type StructWithMultiOptionInput = { multiple: [Option<BigNumberish>, Option<BigNumberish>, Option<BigNumberish>, Option<BigNumberish>, Option<BigNumberish>] };
export type StructWithMultiOptionOutput = { multiple: [Option<number>, Option<number>, Option<number>, Option<number>, Option<number>] };

interface MyContractAbiInterface extends Interface {
export interface MyContractAbiInterface extends Interface {
functions: {
type_address: FunctionFragment;
type_contract_id: FunctionFragment;
Expand Down

0 comments on commit ad9adcd

Please sign in to comment.