import hljs from 'highlight.js/lib/highlight' ; import { HLJSLang } from '../types' ; export param { Record < string , HLJSLang > } languages export default function registerLanguages ( languages ) { if ( typeof languages !== 'object' ) { return ; } Object . keys ( languages ) . forEach ( languageName => { const language = languages [ languageName ] ; hljs . registerLanguage ( languageName , language ) ; } ) ; }