7ca6334dbd
This only applies in JS, where `@template` tags can apply to initialisers of variable declarations: ```js /** * @template T * @returns {(b: T) => T} */ const seq = a => b => b ``` Fixes #36201
18 lines
351 B
TypeScript
18 lines
351 B
TypeScript
// @checkJs: true
|
|
// @allowJs: true
|
|
// @declaration: true
|
|
// @emitDeclarationOnly: true
|
|
// @filename: instantiateTemplateTagTypeParameterOnVariableStatement.js
|
|
/**
|
|
* @template T
|
|
* @param {T} a
|
|
* @returns {(b: T) => T}
|
|
*/
|
|
const seq = a => b => b;
|
|
|
|
const text1 = "hello";
|
|
const text2 = "world";
|
|
|
|
/** @type {string} */
|
|
var text3 = seq(text1)(text2);
|