15 lines
498 B
TypeScript
15 lines
498 B
TypeScript
export function infer<T>(arg: T) : T {
|
|
console.error('infer should be replaced with runtime type information by a magic TypeScript plugin')
|
|
return arg
|
|
}
|
|
|
|
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(`Creating typed-function "${name}" with types ${types}`)
|
|
return arg
|
|
}
|