有没有办法从打字稿编译器API获取节点的行号?

Is there a way to get the line number of node from typescript compiler API?

我知道我们可以使用 node.pos 获取节点的位置,但是有没有办法获取节点的行号?类似于 node.lineNumber?

let { line, character } = 
sourceFile.getLineAndCharacterOfPosition(node.getStart());
    console.log(`${sourceFile.fileName} (${line + 1},${character + 1}): 
${message}`);

从这里开始:

https://github.com/Microsoft/TypeScript-wiki/blob/master/Using-the-Compiler-API.md