import * as vscode from 'vscode' ; /**
 * Reads the package.json of the extension.
 */ export class PackageInfo { public static extension : vscode . Extension < any > ; /**
     * Sets the extension path.
     * Called on extension activation.
     */ public static Init ( context ) { const _extension = context . globalState [ "_extension" ] ; const extensionName = _extension . id ; this . extension = vscode . extensions . getExtension ( extensionName ) ! ; } /**
     * Convenience method to return the configuration/the settings.
     */ public static getConfiguration ( ) { const packageJSON = this . extension . packageJSON ; const extensionBaseName = packageJSON . name ; const config = vscode . workspace . getConfiguration ( extensionBaseName , null ) ; return config ; } }