mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
24 lines
710 B
Plaintext
24 lines
710 B
Plaintext
//// [tests/cases/compiler/arrowExpressionBodyJSDoc.ts] ////
|
|
|
|
=== mytest.js ===
|
|
/**
|
|
* @template T
|
|
* @param {T|undefined} value value or not
|
|
* @returns {T} result value
|
|
*/
|
|
const foo1 = value => /** @type {string} */({ ...value });
|
|
>foo1 : Symbol(foo1, Decl(mytest.js, 5, 5))
|
|
>value : Symbol(value, Decl(mytest.js, 5, 12))
|
|
>value : Symbol(value, Decl(mytest.js, 5, 12))
|
|
|
|
/**
|
|
* @template T
|
|
* @param {T|undefined} value value or not
|
|
* @returns {T} result value
|
|
*/
|
|
const foo2 = value => /** @type {string} */(/** @type {T} */({ ...value }));
|
|
>foo2 : Symbol(foo2, Decl(mytest.js, 12, 5))
|
|
>value : Symbol(value, Decl(mytest.js, 12, 12))
|
|
>value : Symbol(value, Decl(mytest.js, 12, 12))
|
|
|