2023-09-01 16:21:45 +00:00
|
|
|
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')
|
|
|
|
}
|
|
|
|
|
2023-09-01 16:36:50 +00:00
|
|
|
console.log(`TYPED-FUNCTION: Creating function "${name}" 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
|
|
|
|
}
|