diff --git a/cli/asc.d.ts b/cli/asc.d.ts index bb60c5008c..2175c78c04 100644 --- a/cli/asc.d.ts +++ b/cli/asc.d.ts @@ -4,8 +4,19 @@ */ import { OptionDescription } from "./util/options"; +import { Source, Range, DiagnosticMessage } from ".."; + export { OptionDescription }; +/** Relevant subset of the Source class for diagnostic reporting. */ +export { Source }; + +/** Relevant subset of the Range class for diagnostic reporting. */ +export { Range }; + +/** Relevant subset of the DiagnosticMessage class for diagnostic reporting. */ +export { DiagnosticMessage }; + /** Ready promise resolved once/if the compiler is ready. */ export const ready: Promise; @@ -55,36 +66,6 @@ export interface MemoryStream extends OutputStream { toString(): string; } -/** Relevant subset of the Source class for diagnostic reporting. */ -export interface Source { - /** Normalized path with file extension. */ - normalizedPath: string; -} - -/** Relevant subset of the Range class for diagnostic reporting. */ -export interface Range { - /** Start offset within the source file. */ - start: number; - /** End offset within the source file. */ - end: number; - /** Respective source file. */ - source: Source; -} - -/** Relevant subset of the DiagnosticMessage class for diagnostic reporting. */ -export interface DiagnosticMessage { - /** Message code. */ - code: number; - /** Message category. */ - category: number; - /** Message text. */ - message: string; - /** Respective source range, if any. */ - range: Range | null; - /** Related range, if any. */ - relatedRange: Range | null; -} - /** A function handling diagnostic messages. */ type DiagnosticReporter = (diagnostic: DiagnosticMessage) => void;