fix generics/type-assertion formatting

This commit is contained in:
SaschaNaz
2015-08-11 23:47:44 +09:00
parent 92f152cb8e
commit dfcc1e6944
3 changed files with 34 additions and 10 deletions

View File

@@ -5,6 +5,7 @@
//// }
////}
/////*typeArguments*/var foo = new Foo < number, Array < number > > ( );
/////*typeArgumentsWithTypeLiterals*/foo = new Foo < { bar : number }, Array < { baz : string } > > ( );
////
////interface IFoo {
/////*inNewSignature*/new < T > ( a: T);
@@ -25,6 +26,8 @@ verify.currentLineContentIs(" public method<T3, T4>(a: T1, b: Array<T4>): Map
goTo.marker("typeArguments");
verify.currentLineContentIs("var foo = new Foo<number, Array<number>>();");
goTo.marker("typeArgumentsWithTypeLiterals");
verify.currentLineContentIs("foo = new Foo<{ bar: number }, Array<{ baz: string }>>();");
goTo.marker("inNewSignature");
verify.currentLineContentIs(" new <T>(a: T);");

View File

@@ -0,0 +1,13 @@
/// <reference path='fourslash.ts' />
////( < any > publisher);/*1*/
//// < any > 3;/*2*/
format.document();
goTo.marker("1");
verify.currentLineContentIs("(<any>publisher);");
goTo.marker("2");
verify.currentLineContentIs("<any>3;");