typocomath/src/core/$reflect.ts

12 lines
408 B
TypeScript
Raw Normal View History

export function $reflect<T>(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(`INFER: Creating function with types ${types}`)
2023-09-01 18:54:39 +00:00
// TODO: here we can now turn the inputs into a real typed-function with a signature
2023-09-01 15:52:44 +00:00
return arg
}