Skip to content

Commit

Permalink
fix: make writeJSONArray generic
Browse files Browse the repository at this point in the history
  • Loading branch information
redshiftzero committed Jan 27, 2025
1 parent 367cc79 commit 6df4a97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/account_x/x_account_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ export class XAccountController {
await archiveZip.extract({ path: getAccountDataPath("X", this.account.username) });
}

async writeJSONArray(streamWriter: fs.WriteStream, items: any[], propertyName: string) {
async writeJSONArray<T>(streamWriter: fs.WriteStream, items: T[], propertyName: string) {
streamWriter.write(` "${propertyName}": [\n`);
for (let i = 0; i < items.length; i++) {
const suffix = i < items.length - 1 ? ',\n' : '\n';
Expand Down

0 comments on commit 6df4a97

Please sign in to comment.