Skip to content

Commit 1f1417a

Browse files
committed
better
1 parent 90b0081 commit 1f1417a

File tree

5 files changed

+10
-18
lines changed

5 files changed

+10
-18
lines changed

dist/globals.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +0,0 @@
1-
/// <reference path="./typings/tsd.d.ts"/>
2-
/// <reference path="./typings/bluebird.d.ts"/>
3-
/// <reference path="./typings/codemirror.d.ts"/>
4-
/// <reference path="./typings/brackets.d.ts"/>
5-
/// <reference path="./typings/minimatch.d.ts"/>
6-
/// <reference path="./typings/mustache.d.ts"/>
7-
/// <reference path="../views/views.d.ts"/>
8-
/// <reference path="./typings/atompromise.d.ts"/>

lib/globals.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ interface EmitOutput {
6262
sourceFileName: string;
6363
outputFiles: string[];
6464
success: boolean;
65-
errors: TSError[];
65+
errors: CodeError[];
6666
emitError: boolean;
6767
}
6868

@@ -82,10 +82,10 @@ interface BuildUpdate {
8282
errorCount: number;
8383
firstError: boolean;
8484
filePath: string;
85-
errorsInFile: TSError[];
85+
errorsInFile: CodeError[];
8686
}
8787

88-
interface TSError {
88+
interface CodeError {
8989
filePath: string;
9090
startPos: EditorPosition;
9191
endPos: EditorPosition;

lib/main/atom/views/mainPanelView.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,9 @@ export function hide() {
500500
export module errorView {
501501
const MAX_ERRORS = 50;
502502

503-
var filePathErrors: utils.Dict<TSError[]> = new utils.Dict<any[]>();
503+
var filePathErrors: utils.Dict<CodeError[]> = new utils.Dict<any[]>();
504504

505-
export var setErrors = (filePath: string, errorsForFile: TSError[]) => {
505+
export var setErrors = (filePath: string, errorsForFile: CodeError[]) => {
506506
if (!panelView || !panelView.clearError) {
507507
// if not initialized, just quit; might happen when atom is first opened.
508508
return;
@@ -534,7 +534,7 @@ export module errorView {
534534
else {
535535
var totalErrorCount = 0;
536536
for (var path in filePathErrors.table) {
537-
filePathErrors.getValue(path).forEach((error: TSError) => {
537+
filePathErrors.getValue(path).forEach((error: CodeError) => {
538538
totalErrorCount++;
539539
panelView.addError(new lineMessageView.LineMessageView({
540540
goToLine: (filePath, line, col) => gotoHistory.gotoLine(filePath, line, col, gotoHistory.errorsInOpenFiles),

lib/main/lang/modules/building.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let babel: any;
1212
/** If we get a compile request for a ts file that is not in project. We return a js file with the following content */
1313
export const Not_In_Context = "/* NotInContext */";
1414

15-
export function diagnosticToTSError(diagnostic: ts.Diagnostic): TSError {
15+
export function diagnosticToTSError(diagnostic: ts.Diagnostic): CodeError {
1616
var filePath = diagnostic.file.fileName;
1717
var startPosition = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
1818
var endPosition = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start + diagnostic.length);
@@ -30,7 +30,7 @@ export function emitFile(proj: project.Project, filePath: string): EmitOutput {
3030
var services = proj.languageService;
3131
var output = services.getEmitOutput(filePath);
3232
var emitDone = !output.emitSkipped;
33-
var errors: TSError[] = [];
33+
var errors: CodeError[] = [];
3434

3535
let sourceFile = services.getSourceFile(filePath);
3636

lib/main/lang/projectService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ function getDiagnositcsByFilePath(query: FilePathQuery) {
392392
}
393393

394394
export function errorsForFile(query: FilePathQuery): Promise<{
395-
errors: TSError[]
395+
errors: CodeError[]
396396
}> {
397397
consistentPath(query);
398398
let project: project.Project;
@@ -413,7 +413,7 @@ export function errorsForFile(query: FilePathQuery): Promise<{
413413
return resolve({ errors: errors });
414414
}
415415
else {
416-
let result: TSError[];
416+
let result: CodeError[];
417417

418418
if (project.includesSourceFile(query.filePath)) {
419419
result = getDiagnositcsByFilePath(query).map(building.diagnosticToTSError);

0 commit comments

Comments
 (0)