48 lines
956 B
Text
48 lines
956 B
Text
|
=== tests/cases/compiler/commentsTypeParameters.ts ===
|
||
|
class C</**docComment for type parameter*/ T> {
|
||
|
>C : C<T>
|
||
|
>T : T
|
||
|
|
||
|
method</**docComment of method type parameter */ U extends T>(a: U) {
|
||
|
>method : <U extends T>(a: U) => void
|
||
|
>U : U
|
||
|
>T : T
|
||
|
>a : U
|
||
|
>U : U
|
||
|
}
|
||
|
static staticmethod</**docComment of method type parameter */ U>(a: U) {
|
||
|
>staticmethod : <U>(a: U) => void
|
||
|
>U : U
|
||
|
>a : U
|
||
|
>U : U
|
||
|
}
|
||
|
|
||
|
private privatemethod</**docComment of method type parameter */ U extends T>(a: U) {
|
||
|
>privatemethod : <U extends T>(a: U) => void
|
||
|
>U : U
|
||
|
>T : T
|
||
|
>a : U
|
||
|
>U : U
|
||
|
}
|
||
|
private static privatestaticmethod</**docComment of method type parameter */ U>(a: U) {
|
||
|
>privatestaticmethod : <U>(a: U) => void
|
||
|
>U : U
|
||
|
>a : U
|
||
|
>U : U
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function compare</**type*/T>(a: T, b: T) {
|
||
|
>compare : <T>(a: T, b: T) => boolean
|
||
|
>T : T
|
||
|
>a : T
|
||
|
>T : T
|
||
|
>b : T
|
||
|
>T : T
|
||
|
|
||
|
return a === b;
|
||
|
>a === b : boolean
|
||
|
>a : T
|
||
|
>b : T
|
||
|
}
|