* Validating `expectedTokenKind` ensures the token was typed in the context we expect (eg: not a comment). * @param expectedTokenKind The kind of the last token constituting the desired parent node.
(end, expectedTokenKind, sourceFile)
| 147055 | * @param expectedTokenKind The kind of the last token constituting the desired parent node. |
| 147056 | */ |
| 147057 | function findImmediatelyPrecedingTokenOfKind(end, expectedTokenKind, sourceFile) { |
| 147058 | var precedingToken = ts.findPrecedingToken(end, sourceFile); |
| 147059 | return precedingToken && precedingToken.kind === expectedTokenKind && end === precedingToken.getEnd() ? |
| 147060 | precedingToken : |
| 147061 | undefined; |
| 147062 | } |
| 147063 | /** |
| 147064 | * Finds the highest node enclosing `node` at the same list level as `node` |
| 147065 | * and whose end does not exceed `node.end`. |
no outgoing calls
no test coverage detected