2016-08-22 22:57:40 +02:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
|
|
|
|
// Should handle shorthand property assignments of class constructors
|
|
|
|
|
|
|
|
//// interface Foo {
|
|
|
|
//// someFunction(): void;
|
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// interface FooConstructor {
|
|
|
|
//// new (): Foo
|
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// interface Bar {
|
|
|
|
//// Foo: FooConstructor;
|
|
|
|
//// }
|
|
|
|
////
|
2018-05-31 22:32:02 +02:00
|
|
|
//// var x = class /*classExpression*/Foo {
|
2016-08-22 22:57:40 +02:00
|
|
|
//// createBarInClassExpression(): Bar {
|
|
|
|
//// return {
|
|
|
|
//// Fo/*classExpressionRef*/o
|
|
|
|
//// };
|
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// someFunction() {}
|
|
|
|
//// }
|
|
|
|
////
|
2018-05-31 22:32:02 +02:00
|
|
|
//// class /*declaredClass*/Foo {
|
2016-08-22 22:57:40 +02:00
|
|
|
////
|
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// function createBarUsingClassDeclaration(): Bar {
|
|
|
|
//// return {
|
|
|
|
//// Fo/*declaredClassRef*/o
|
|
|
|
//// };
|
|
|
|
//// }
|
|
|
|
|
|
|
|
goTo.marker("classExpressionRef");
|
|
|
|
goTo.implementation();
|
|
|
|
verify.caretAtMarker("classExpression");
|
|
|
|
|
|
|
|
goTo.marker("declaredClassRef");
|
|
|
|
goTo.implementation();
|
2018-05-31 22:32:02 +02:00
|
|
|
verify.caretAtMarker("declaredClass");
|