import { SyntaxKind } from 'typescript' ; export const syntaxKindMap = { } ; for ( const name of Object . keys ( SyntaxKind ) . filter ( x => isNaN ( parseInt ( x , 10 ) ) ) ) { const value = SyntaxKind [ name as any ] ; if ( ! syntaxKindMap [ value ] ) { syntaxKindMap [ value ] = name ; } } export function syntaxKindName ( kind ) { return syntaxKindMap [ kind ] ; }