mirror of
https://github.com/bendtherules/ts-transformer-visualizer.git
synced 2026-08-19 00:35:13 +00:00
lib - Add node highlighting and consume in log-identifier
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import * as ts from "typescript";
|
||||
import { highlightNode } from "ts-transformer-visualizer";
|
||||
|
||||
import { TransformModuleExport } from "../types";
|
||||
|
||||
const sourceCodeString = `\
|
||||
@@ -15,6 +17,7 @@ const transformer: ts.TransformerFactory<ts.SourceFile> = context => {
|
||||
return sourceFile => {
|
||||
const visitor = (node: ts.Node): ts.Node => {
|
||||
if (ts.isIdentifier(node)) {
|
||||
highlightNode(node);
|
||||
console.log(node.text);
|
||||
}
|
||||
return ts.visitEachChild(node, visitor, context);
|
||||
|
||||
Reference in New Issue
Block a user