最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

typescript - How to retrieve all types of files during the conversion to JS - Stack Overflow

programmeradmin4浏览0评论

Help: I ​​want to get all the dependent files during the rollup packaging process, but now I encounter a problem and cannot get the type declaration file. How can I solve it?

/**
 * @type {import("typescript").TransformerFactory<ts.Node>}
 */
export const typeCollector = function (context) {
  return (sourceFile) => {
    console.log(context);
    function visitor(node) {
      return node;
    }
    return ts.visitNode(sourceFile, visitor);
  };
};

I want to collect during the conversion process, is this idea correct?

发布评论

评论列表(0)

  1. 暂无评论