🎉 initiate project *astro_rewrite*
This commit is contained in:
		
							parent
							
								
									ffd4d5e86c
								
							
						
					
					
						commit
						2ba37bfbe3
					
				
					 8658 changed files with 2268794 additions and 2538 deletions
				
			
		
							
								
								
									
										23
									
								
								node_modules/@astrojs/language-server/dist/plugins/astro/features/DiagnosticsProvider.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								node_modules/@astrojs/language-server/dist/plugins/astro/features/DiagnosticsProvider.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,23 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.DiagnosticsProviderImpl = void 0;
 | 
			
		||||
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
 | 
			
		||||
class DiagnosticsProviderImpl {
 | 
			
		||||
    constructor(languageServiceManager) {
 | 
			
		||||
        this.languageServiceManager = languageServiceManager;
 | 
			
		||||
    }
 | 
			
		||||
    async getDiagnostics(document) {
 | 
			
		||||
        const { tsDoc } = (await this.languageServiceManager.getLSAndTSDoc(document));
 | 
			
		||||
        return tsDoc.compilerDiagnostics.map(this.compilerMessageToDiagnostic);
 | 
			
		||||
    }
 | 
			
		||||
    compilerMessageToDiagnostic(message) {
 | 
			
		||||
        return {
 | 
			
		||||
            message: message.text + '\n\n' + message.hint,
 | 
			
		||||
            range: vscode_languageserver_types_1.Range.create(message.location.line - 1, message.location.column - 1, message.location.line, message.location.length),
 | 
			
		||||
            code: message.code,
 | 
			
		||||
            severity: message.severity,
 | 
			
		||||
            source: 'astro',
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
exports.DiagnosticsProviderImpl = DiagnosticsProviderImpl;
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue