public Diagnostic[] GetDiagnostics(FileName fileName, ITypeScriptOptions options) { host.UpdateCompilerSettings(options); host.UpdateFileName(fileName); context.Run(scriptLoader.GetDiagnosticsScript()); return(host.SemanticDiagnosticsResult.result.Concat( host.SyntacticDiagnosticsResult.result) .ToArray()); }
public Diagnostic[] GetDiagnostics(FileName fileName, ITypeScriptOptions options) { if (context == null) { return new [] { GetMicrosoftRuntimeNotInstalledDiagnostic() } } ; host.UpdateCompilerSettings(options); host.UpdateFileName(fileName); context.Run(scriptLoader.GetDiagnosticsScript()); return(host.SemanticDiagnosticsResult.result.Concat( host.SyntacticDiagnosticsResult.result) .ToArray()); }