image.png

    1. /* 类型函数 */
    2. type isNull<T> =T;
    3. function go():isNull<String>{
    4. return "hello world"
    5. }
    6. /* v-t混合 */
    7. function echo<T>(v:T):T{
    8. return v;
    9. }
    10. echo<String>("hello world");
    /* v-t混合 */
    const echo = <T>(v:T)=>v;