diff --git a/src/index.ts b/src/index.ts index fbfbd25..e0e6c28 100644 --- a/src/index.ts +++ b/src/index.ts @@ -399,9 +399,9 @@ function tsPlugin(options?: { node: any, endLoc: Position = this.lastTokEndLoc ): void { - node.end = endLoc.column + node.end = endLoc.index node.loc.end = endLoc - if (this.options.ranges) node.range[1] = endLoc.column + if (this.options.ranges) node.range[1] = endLoc.index } startNodeAtNode(type: Node): any {