mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Merging
This commit is contained in:
19
tests/cases/fourslash/findAllRefsOnDecorators.ts
Normal file
19
tests/cases/fourslash/findAllRefsOnDecorators.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @Filename: a.ts
|
||||
////function decorator(target) {
|
||||
//// return target;
|
||||
////}
|
||||
////decorator();
|
||||
|
||||
// @Filename: b.ts
|
||||
////@deco/*1*/rator @decorator("again")
|
||||
////class C {
|
||||
//// @decorator
|
||||
//// method() {}
|
||||
////}
|
||||
|
||||
goTo.file("b.ts");
|
||||
goTo.marker("1");
|
||||
|
||||
verify.referencesCountIs(5);
|
||||
14
tests/cases/fourslash/getOccurrencesOfDecorators.ts
Normal file
14
tests/cases/fourslash/getOccurrencesOfDecorators.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: b.ts
|
||||
////@/*1*/decorator
|
||||
////class C {
|
||||
//// @decorator
|
||||
//// method() {}
|
||||
////}
|
||||
////function decorator(target) {
|
||||
//// return target;
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
verify.occurrencesAtPositionCount(3);
|
||||
26
tests/cases/fourslash/goToDefinitionDecorator.ts
Normal file
26
tests/cases/fourslash/goToDefinitionDecorator.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: b.ts
|
||||
////@/*decoratorUse*/decorator
|
||||
////class C {
|
||||
//// @decora/*decoratorFactoryUse*/torFactory(a, "22", true)
|
||||
//// method() {}
|
||||
////}
|
||||
|
||||
|
||||
// @Filename: a.ts
|
||||
/////*decoratorDefinition*/function decorator(target) {
|
||||
//// return target;
|
||||
////}
|
||||
/////*decoratorFactoryDefinition*/function decoratorFactory(...args) {
|
||||
//// return target => target;
|
||||
////}
|
||||
|
||||
|
||||
goTo.marker('decoratorUse');
|
||||
goTo.definition();
|
||||
verify.caretAtMarker('decoratorDefinition');
|
||||
|
||||
goTo.marker('decoratorFactoryUse');
|
||||
goTo.definition();
|
||||
verify.caretAtMarker('decoratorFactoryDefinition');
|
||||
11
tests/cases/fourslash/quickInfoForDecorators.ts
Normal file
11
tests/cases/fourslash/quickInfoForDecorators.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////@/*1*/decorator
|
||||
////class C {
|
||||
|
||||
////}
|
||||
/////** decorator documentation*/
|
||||
////var decorator = t=> t;
|
||||
|
||||
goTo.marker("1");
|
||||
verify.quickInfoIs("var decorator: (t: any) => any", "decorator documentation");
|
||||
Reference in New Issue
Block a user