mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 00:59:03 +01:00
Add more specific check for lib files on web
This commit is contained in:
@@ -722,8 +722,8 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
||||
|
||||
public toResource(filepath: string): vscode.Uri {
|
||||
if (isWeb()) {
|
||||
// On web, treat absolute paths as pointing to standard lib files
|
||||
if (filepath.startsWith('/')) {
|
||||
// On web, the stdlib paths that TS return look like: '/lib.es2015.collection.d.ts'
|
||||
if (filepath.startsWith('/lib.') && filepath.endsWith('.d.ts')) {
|
||||
return vscode.Uri.joinPath(this.context.extensionUri, 'dist', 'browser', 'typescript', filepath.slice(1));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user