Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into entrykit
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Oct 30, 2024
2 parents 9e2f624 + 5340394 commit 16d558c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/smart-suns-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/abi-ts": patch
---

Using a TS extension (rather than DTS) now correctly includes `as const` in the TS output.
2 changes: 1 addition & 1 deletion packages/abi-ts/src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const command: CommandModule<Options, Options> = {

const ts = tsExtension.includes(".d.")
? `declare const abi: ${json};\n\nexport default abi;\n`
: `const abi = ${json};\n\nexport default abi;\n`;
: `const abi = ${json} as const;\n\nexport default abi;\n`;

debug("Writing", tsFilename);
writeFileSync(tsFilename, ts);
Expand Down

0 comments on commit 16d558c

Please sign in to comment.