import { collectVariableUsage } from 'tsutils' ; import * as ts from 'typescript' ; param declarationIdentifier returns export function getUses ( declarationIdentifier ) { return collectVariableUsage ( declarationIdentifier . getSourceFile ( ) ) . get ( declarationIdentifier ) ! . uses . map ( x => x . location ) ; }