Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
weswigham committed May 16, 2019
1 parent 60923c5 commit 93756d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ namespace ts {
}
};

type SpanAwareTextWriter = EmitTextWriter & { getPendingAnnotationSpans(): AnnotationSpan[] | undefined; setSpanOffsetPos(offset: number): void }
type SpanAwareTextWriter = EmitTextWriter & { getPendingAnnotationSpans(): AnnotationSpan[] | undefined; setSpanOffsetPos(offset: number): void };

function getSpanAwareTextWriter() {
let spans: AnnotationSpan[] | undefined;
Expand All @@ -422,13 +422,13 @@ namespace ts {
};
const captureExpansionSpan = (start: number, length: number, printCallback: (writer: EmitTextWriter) => string) => {
(spans || (spans = [])).push(registerExpansionCallback(start + offset, length, printCallback));
}
};
const typeWriter = createTextWriter("", captureSymbolSpan, captureExpansionSpan) as SpanAwareTextWriter;
typeWriter.getPendingAnnotationSpans = () => {
const result = spans;
spans = undefined;
return result;
}
};
typeWriter.setSpanOffsetPos = newOffset => void (offset = newOffset);
return typeWriter;
}
Expand Down Expand Up @@ -3483,7 +3483,7 @@ namespace ts {
const printer = getExpansionSpanAwarePrinter(writer, sourceFile);
printer.writeNode(EmitHint.Unspecified, expansionCb(), sourceFile, writer);
return writer.getText();
}
};
writer.writeExpansionSpan!(start, length, printCb);
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5854,7 +5854,7 @@ namespace ts {
getIndent(): number;
isAtStartOfLine(): boolean;
getTextPosWithWriteLine?(): number;
writeExpansionSpan?(start: number, length: number, printCallback: (writer: EmitTextWriter) => string): void;
writeExpansionSpan?(start: number, length: number, printCallback: (writer: EmitTextWriter) => string): void;
}

export interface GetEffectiveTypeRootsHost {
Expand Down
2 changes: 1 addition & 1 deletion src/server/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2091,7 +2091,7 @@ namespace ts.server {
// TODO: Issue an error response of some kind?
return { text: "..." };
}
return { text: result.text, annotations: mapDefined(result.annotations, convertAnnotationSpanToDiagnosticAnnotationSpan) }
return { text: result.text, annotations: mapDefined(result.annotations, convertAnnotationSpanToDiagnosticAnnotationSpan) };
}

getCanonicalFileName(fileName: string) {
Expand Down

0 comments on commit 93756d5

Please sign in to comment.