typocomath/src/core/typed.ts

10 lines
350 B
TypeScript

export function typed<T>(name: string, types: string, arg: T) : T {
// TODO: implement typed-function for real
if (types === '__infer__') {
console.error('__infer__ should be replaced with runtime type information by the TypeScript plugin')
}
console.log(`TYPED-FUNCTION: Creating function "${name}" with types ${types}`)
return arg
}