2016-06-03 20:02:35 +02:00
|
|
|
/// <reference path="fourslash.ts"/>
|
|
|
|
|
|
|
|
/////** @template T */
|
|
|
|
////function ident<T>: T {
|
|
|
|
////}
|
|
|
|
|
2020-09-11 21:10:55 +02:00
|
|
|
const c = classification("original");
|
2016-06-03 20:02:35 +02:00
|
|
|
verify.syntacticClassificationsAre(
|
|
|
|
c.comment("/** "),
|
|
|
|
c.punctuation("@"),
|
|
|
|
c.docCommentTagName("template"),
|
|
|
|
c.typeParameterName("T"),
|
|
|
|
c.comment(" */"),
|
|
|
|
c.keyword("function"),
|
|
|
|
c.identifier("ident"),
|
|
|
|
c.punctuation("<"),
|
|
|
|
c.typeParameterName("T"),
|
|
|
|
c.punctuation(">"),
|
|
|
|
c.punctuation(":"),
|
|
|
|
c.identifier("T"),
|
|
|
|
c.punctuation("{"),
|
|
|
|
c.punctuation("}"));
|
2020-09-11 21:10:55 +02:00
|
|
|
|
|
|
|
const c2 = classification("2020");
|
|
|
|
verify.semanticClassificationsAre("2020",
|
|
|
|
c2.semanticToken("function.declaration", "ident"),
|
|
|
|
c2.semanticToken("typeParameter.declaration", "T"),
|
|
|
|
c2.semanticToken("typeParameter", "T"),
|
|
|
|
);
|