ts-morph icon indicating copy to clipboard operation
ts-morph copied to clipboard

.getFullStartLineNumber() ?

Open noqcks opened this issue 1 year ago • 0 comments

I can get a code block and surrounding comments context with .getFullText() (line numbers added by me for this example)

3 
4 // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'high... Remove this comment to see the full error message
5 import hljs from 'highlight.js/lib/core'

when I do .getStartLineNumber() I get back 5. Is there any way to get the start line of the full surrounding context i.e 3 in this case?

using .getStartLineNumber(true) still results in 5

noqcks avatar Apr 23 '24 19:04 noqcks