import { TextDocuments } from "vscode-languageserver" ; import { TextDocument } from "vscode-languageserver-types" ; export function createTextDocumentsMock ( documentsMap ) { class TextDocumentsMock extends TextDocuments { get ( uri ) { let textDocument = documentsMap . get ( uri ) ; return textDocument ; } } return new TextDocumentsMock ( ) ; }