mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 00:36:29 -05:00
Merge branch 'master' into navtree
This commit is contained in:
@@ -136,6 +136,7 @@ declare namespace FourSlashInterface {
|
||||
typeDefinitionCountIs(expectedCount: number): void;
|
||||
implementationListIsEmpty(): void;
|
||||
isValidBraceCompletionAtPosition(openingBrace?: string): void;
|
||||
codeFixAvailable(): void;
|
||||
}
|
||||
class verify extends verifyNegatable {
|
||||
assertHasRanges(ranges: Range[]): void;
|
||||
@@ -208,6 +209,7 @@ declare namespace FourSlashInterface {
|
||||
noMatchingBracePositionInCurrentFile(bracePosition: number): void;
|
||||
DocCommentTemplate(expectedText: string, expectedOffset: number, empty?: boolean): void;
|
||||
noDocCommentTemplate(): void;
|
||||
codeFixAtPosition(expectedText: string, errorCode?: number): void;
|
||||
|
||||
navigationBar(json: any): void;
|
||||
navigationTree(json: any): void;
|
||||
|
||||
7
tests/cases/fourslash/jsDocForTypeAlias.ts
Normal file
7
tests/cases/fourslash/jsDocForTypeAlias.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
///<reference path="fourslash.ts" />
|
||||
|
||||
/////** DOC */
|
||||
////type /**/T = number
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoIs("type T = number", "DOC ");
|
||||
10
tests/cases/fourslash/server/codefix.ts
Normal file
10
tests/cases/fourslash/server/codefix.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////class Base{
|
||||
////}
|
||||
////class C extends Base{
|
||||
//// constructor() {[| |]
|
||||
//// }
|
||||
////}
|
||||
|
||||
verify.codeFixAtPosition('super();');
|
||||
10
tests/cases/fourslash/superFix1.ts
Normal file
10
tests/cases/fourslash/superFix1.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////class Base{
|
||||
////}
|
||||
////class C extends Base{
|
||||
//// constructor() {[| |]
|
||||
//// }
|
||||
////}
|
||||
|
||||
verify.codeFixAtPosition('super();');
|
||||
13
tests/cases/fourslash/superFix2.ts
Normal file
13
tests/cases/fourslash/superFix2.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////class Base{
|
||||
////}
|
||||
////class C extends Base{
|
||||
//// private a:number;
|
||||
//// constructor() {[|
|
||||
//// this.a = 12;
|
||||
//// super();|]
|
||||
//// }
|
||||
////}
|
||||
|
||||
verify.codeFixAtPosition("super(); this.a = 12;");
|
||||
12
tests/cases/fourslash/superFix3.ts
Normal file
12
tests/cases/fourslash/superFix3.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////class Base{
|
||||
//// constructor(id: number) { }
|
||||
////}
|
||||
////class C extends Base{
|
||||
//// constructor(private a:number) {
|
||||
//// super(this.a);
|
||||
//// }
|
||||
////}
|
||||
|
||||
verify.not.codeFixAvailable();
|
||||
Reference in New Issue
Block a user