example.ts
export const action = (data: Record<any, any>) => {
data.updatedDate = new Date();
return data;
};
data.ts
import {action} from '../lib/action'
class User {
username: string;
password: string;
}
const result = action(User);
console.log(result.updatedDate)
Can the output type of the function action
be customized to extend an unspecified input?