Expose ts.Diagnostics to fourslash
This commit is contained in:
parent
52894cf850
commit
ad9c36e0ec
2 changed files with 18 additions and 1 deletions
|
@ -42,6 +42,8 @@
|
|||
//
|
||||
// TODO: figure out a better solution to the API exposure problem.
|
||||
|
||||
/// <reference path="../../../src/compiler/diagnosticInformationMap.generated.ts" />
|
||||
|
||||
declare module ts {
|
||||
export type MapKey = string | number;
|
||||
export interface Map<T> {
|
||||
|
@ -70,6 +72,21 @@ declare module ts {
|
|||
text: string;
|
||||
}
|
||||
|
||||
enum DiagnosticCategory {
|
||||
Warning,
|
||||
Error,
|
||||
Suggestion,
|
||||
Message
|
||||
}
|
||||
|
||||
interface DiagnosticMessage {
|
||||
key: string;
|
||||
category: DiagnosticCategory;
|
||||
code: number;
|
||||
message: string;
|
||||
reportsUnnecessary?: {};
|
||||
}
|
||||
|
||||
function flatMap<T, U>(array: ReadonlyArray<T>, mapfn: (x: T, i: number) => U | ReadonlyArray<U> | undefined): U[];
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
////const b = <div x={<div />[|x|]} />
|
||||
|
||||
test.ranges().forEach(range => {
|
||||
verify.errorExistsAtRange(range, 1005, "'}' expected.");
|
||||
verify.errorExistsAtRange(range, ts.Diagnostics._0_expected.code, "'}' expected.");
|
||||
// This is just to ensure getting quick info doesn’t crash
|
||||
verify.not.quickInfoExists();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue