import { Uri , window , workspace } from 'vscode' ; param uri export async function openResource ( uri ) { return await workspace . openTextDocument ( uri ) . then ( document => { if ( document ) { window . showTextDocument ( document ) ; } } , error => window . showErrorMessage ( `Error loading document: ${ error }` ) ) ; }