2015-03-02 23:41:44 +01:00
|
|
|
/// <reference path="fourslash.ts"/>
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
////class Foo {
|
|
|
|
//// doStuff(): number { return 0; }
|
|
|
|
//// static staticMethod() {}
|
|
|
|
////}
|
|
|
|
////module Foo {
|
|
|
|
//// export var x: number;
|
|
|
|
////}
|
|
|
|
////Foo/*c1*/; // should get "x", "prototype"
|
2017-05-25 00:24:49 +02:00
|
|
|
////var s: Foo/*c2*/; // no types, in Foo, so shouldnt have anything
|
2014-07-13 01:04:16 +02:00
|
|
|
////var f = new Foo();
|
|
|
|
////f/*c3*/;
|
|
|
|
|
|
|
|
goTo.marker("c1");
|
|
|
|
edit.insert(".");
|
2020-09-11 23:48:24 +02:00
|
|
|
verify.completions({
|
|
|
|
includes: [
|
|
|
|
{ name: "x", sortText: completion.SortText.LocationPriority },
|
|
|
|
{ name: "prototype", sortText: completion.SortText.LocationPriority },
|
|
|
|
{ name: "staticMethod", sortText: completion.SortText.LocalDeclarationPriority }
|
|
|
|
]
|
|
|
|
});
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("c2");
|
|
|
|
edit.insert(".");
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions({ exact: undefined });
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("c3");
|
|
|
|
edit.insert(".");
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions({ exact: "doStuff" });
|