Add type declaration to exported function.