import { Position } from 'vscode-languageserver' ; import { TextDocumentIdentifier } from 'vscode-languageserver-protocol' ; import { FileSystem } from './fileSystem' ; import { convertUriToPath } from './pathUtils' ; export class UriParser { constructor ( private _fs ) { } public decodeTextDocumentPosition ( textDocument , position ) { const filePath = convertUriToPath ( this . _fs , textDocument . uri ) ; return { filePath , position } ; } public decodeTextDocumentUri ( uriString ) { return convertUriToPath ( this . _fs , uriString ) ; } }