mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
24 lines
490 B
TypeScript
24 lines
490 B
TypeScript
//// [tests/cases/compiler/assignmentToInstantiationExpression.ts] ////
|
|
|
|
//// [assignmentToInstantiationExpression.ts]
|
|
let obj: { fn?: <T>() => T } = {};
|
|
obj.fn<number> = () => 1234;
|
|
|
|
|
|
let getValue: <T>() => T;
|
|
getValue<number> = () => 1234;
|
|
|
|
|
|
let getValue2!: <T>() => T;
|
|
getValue2<number> = () => 1234;
|
|
|
|
|
|
//// [assignmentToInstantiationExpression.js]
|
|
"use strict";
|
|
let obj = {};
|
|
obj.fn = () => 1234;
|
|
let getValue;
|
|
getValue = () => 1234;
|
|
let getValue2;
|
|
getValue2 = () => 1234;
|