typocomath/src/core/$reflect.ts

12 lines
390 B
TypeScript
Raw Normal View History

2023-09-08 12:25:14 +00:00
export function $reflect<T>(arg: T, types?: string) : T {
// TODO: implement typed-function for real
2023-09-08 12:25:14 +00:00
if (!types) {
console.error('types should be resolved 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
}