(span: AbsoluteSourceSpan | ParseSourceSpan | ParseSpan)
| 58 | } |
| 59 | |
| 60 | export function toTextSpan(span: AbsoluteSourceSpan | ParseSourceSpan | ParseSpan): ts.TextSpan { |
| 61 | let start: number, end: number; |
| 62 | if (span instanceof AbsoluteSourceSpan || span instanceof ParseSpan) { |
| 63 | start = span.start; |
| 64 | end = span.end; |
| 65 | } else { |
| 66 | start = span.start.offset; |
| 67 | end = span.end.offset; |
| 68 | } |
| 69 | return {start, length: end - start}; |
| 70 | } |
| 71 | |
| 72 | interface NodeWithKeyAndValue extends TmplAstNode { |
| 73 | keySpan: ParseSourceSpan; |
no outgoing calls
no test coverage detected