import {ReflectionFunction, stringifyType, typeOf} from '@deepkit/type' import type {Dependencies, Signature, Signatures, OneType} from '../interfaces/type.js' interface LocalSignatures { one: (a: T) => OneType } export const square = (dep: Dependencies<'multiply', T>): Signature<'square', T> => z => dep.multiply(z, z) const sqRefl = ReflectionFunction.from(square) console.log( ' For generic square I know that:', sqRefl, sqRefl.getParameterNames(), sqRefl.getParameterType('dep'), "\n final dep type:", stringifyType(sqRefl.getParameterType('dep'))) console.log(' because', typeOf['one']>()) console.log(' readable:', stringifyType(typeOf['one']>()))