-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
Description
As part of the action levels overhaul (#611), I wonder whether we could introduce a lightweight action_fns()
object, such that:
action_levels(
warn = 1,
fns = list(warn = ~stock_warning(x = x))
)
Becomes:
action_levels(
warn = 1,
fns = action_fns(warn = ~stock_warning(x = x))
)
The most obvious benefit is it'd streamline the deprecation process both for the internal code (fns
can just check whether it's receiving a <action_fns>
object) and for hand-holding users (we can just direct them to use fns = action_fns()
instead, which will host the relevant documentation).
Beyond that, I think having a function is nice because it obviates the need to checks for "list must be named", "list names must be one of xyz", etc. :)