import { EXTENSION_ID } from '../const' ; import * as vscode from 'vscode' ; import ContentProvider from '../content-provider' ; export default class WorkspaceAdaptor { constructor ( private readonly workspace ) { } get < T > ( configName ) { const extensionConfig = this . workspace . getConfiguration ( EXTENSION_ID ) ; return extensionConfig . get ( configName ) as T ; } registerTextDocumentContentProvider ( EXTENSION_SCHEME , contentProvider ) { return this . workspace . registerTextDocumentContentProvider ( EXTENSION_SCHEME , contentProvider ) ; } }