2023-09-08 12:25:14 +00:00
|
|
|
export function $reflect<T>(arg: T, types?: string) : T {
|
2023-09-01 16:21:45 +00:00
|
|
|
// 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')
|
2023-09-01 16:21:45 +00:00
|
|
|
}
|
|
|
|
|
2023-09-08 12:10:03 +00:00
|
|
|
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
|
|
|
|
}
|