### Bug Report Checklist - [x] I have pulled the latest `main` branch of the repository. - [x] I have [searched for related issues](https://github.com/JoshuaKGoldberg/ts-api-utils/issues?q=is%3Aissue) and found none that matched my issue. ### Overview So we can use `for..of` and `Array.from()`, `.toArray()` instead of callbacks. For example: https://github.com/typescript-eslint/typescript-eslint/blob/c1980522cd11f2de1a49ff6a30b4be7765a843ff/packages/typescript-estree/src/convert-comments.ts#L16 This can rewrite as ``` return Array.from(tsutils.getComments(ast), ...); ``` or ``` return tsutils.getComments(ast).map(...).toArray(); ``` ### Additional Info _No response_
Bug Report Checklist
mainbranch of the repository.Overview
So we can use
for..ofandArray.from(),.toArray()instead of callbacks.For example:
https://github.com/typescript-eslint/typescript-eslint/blob/c1980522cd11f2de1a49ff6a30b4be7765a843ff/packages/typescript-estree/src/convert-comments.ts#L16
This can rewrite as
or
Additional Info
No response