1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
tests/cases/compiler/index.js(2,19): error TS2315: Type 'Boolean' is not generic.
tests/cases/compiler/index2.js(2,19): error TS2315: Type 'Void' is not generic.
tests/cases/compiler/index3.js(2,19): error TS2315: Type 'Undefined' is not generic.
tests/cases/compiler/index4.js(2,19): error TS2315: Type 'Function' is not generic.
tests/cases/compiler/index5.js(2,19): error TS2315: Type 'String' is not generic.
tests/cases/compiler/index6.js(2,19): error TS2315: Type 'Number' is not generic.
tests/cases/compiler/index7.js(2,19): error TS2315: Type 'Object' is not generic.
tests/cases/compiler/index8.js(4,12): error TS2304: Cannot find name 'fn'.
tests/cases/compiler/index8.js(4,15): error TS2304: Cannot find name 'T'.
==== tests/cases/compiler/index.js (1 errors) ====
/**
* @param {<T>(m: Boolean<T>) => string} somebody
~~~~~~~~~~
!!! error TS2315: Type 'Boolean' is not generic.
*/
function sayHello(somebody) {
return 'Hello ' + somebody;
}
==== tests/cases/compiler/index2.js (1 errors) ====
/**
* @param {<T>(m: Void<T>) => string} somebody
~~~~~~~
!!! error TS2315: Type 'Void' is not generic.
*/
function sayHello2(somebody) {
return 'Hello ' + somebody;
}
==== tests/cases/compiler/index3.js (1 errors) ====
/**
* @param {<T>(m: Undefined<T>) => string} somebody
~~~~~~~~~~~~
!!! error TS2315: Type 'Undefined' is not generic.
*/
function sayHello3(somebody) {
return 'Hello ' + somebody;
}
==== tests/cases/compiler/index4.js (1 errors) ====
/**
* @param {<T>(m: Function<T>) => string} somebody
~~~~~~~~~~~
!!! error TS2315: Type 'Function' is not generic.
*/
function sayHello4(somebody) {
return 'Hello ' + somebody;
}
==== tests/cases/compiler/index5.js (1 errors) ====
/**
* @param {<T>(m: String<T>) => string} somebody
~~~~~~~~~
!!! error TS2315: Type 'String' is not generic.
*/
function sayHello5(somebody) {
return 'Hello ' + somebody;
}
==== tests/cases/compiler/index6.js (1 errors) ====
/**
* @param {<T>(m: Number<T>) => string} somebody
~~~~~~~~~
!!! error TS2315: Type 'Number' is not generic.
*/
function sayHello6(somebody) {
return 'Hello ' + somebody;
}
==== tests/cases/compiler/index7.js (1 errors) ====
/**
* @param {<T>(m: Object<T>) => string} somebody
~~~~~~~~~
!!! error TS2315: Type 'Object' is not generic.
*/
function sayHello7(somebody) {
return 'Hello ' + somebody;
}
==== tests/cases/compiler/index8.js (2 errors) ====
function fn() {}
/**
* @param {fn<T>} somebody
~~
!!! error TS2304: Cannot find name 'fn'.
~
!!! error TS2304: Cannot find name 'T'.
*/
function sayHello8(somebody) { }
|