Example #1
0
        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());
        }
Example #2
0
        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());
        }