From 93756d581baf0a2c7ae482f5224f122124d9ef5e Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 15 May 2019 17:41:01 -0700 Subject: [PATCH] Fix lints --- src/compiler/checker.ts | 8 ++++---- src/compiler/types.ts | 2 +- src/server/session.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f89d83f5a2f18..35f39ec413fcf 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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; @@ -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; } @@ -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; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 4842da0566849..53857ad729b5f 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -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 { diff --git a/src/server/session.ts b/src/server/session.ts index 88d45b033ebcb..78a83b17336cb 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -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) {