TypeScript/tests/cases/fourslash/nameOfRetypedClassInModule.ts

33 lines
893 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
/// <reference path="fourslash.ts" />
//// module M {
//// }
////
//// module M {
//// /*A*/class A {}
//// /*B*/export class B {}
2014-10-07 20:30:27 +02:00
//// class Check { /*check*/constructor(val) {} }
//// export class Check2 { /*check2*/constructor(val) {} }
2014-07-13 01:04:16 +02:00
//// }
////
edit.disableFormatting();
goTo.marker('check');
2014-10-07 20:30:27 +02:00
verify.quickInfoIs('(constructor) Check(val: any): Check');
2014-07-13 01:04:16 +02:00
goTo.marker('check2');
2014-10-07 20:30:27 +02:00
verify.quickInfoIs('(constructor) M.Check2(val: any): Check2');
2014-07-13 01:04:16 +02:00
goTo.marker('A');
edit.deleteAtCaret('class A {}'.length);
edit.insert('class A { constructor(val) {} }');
2014-10-07 20:30:27 +02:00
edit.moveLeft('constructor(val) {} }'.length);
verify.quickInfoIs('(constructor) A(val: any): A');
2014-07-13 01:04:16 +02:00
goTo.marker('B');
edit.deleteAtCaret('export class B {}'.length);
edit.insert('export class B { constructor(val) {} }');
2014-10-07 20:30:27 +02:00
edit.moveLeft('constructor(val) {} }'.length);
verify.quickInfoIs('(constructor) M.B(val: any): B');