You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version 0.10.0 brought type-specific actions, e.g.:
action(telegram) { // safe-casts request and reactions type to TelegramBotRequest, TelegramReactions
reactions.document("some-url") // use smartcasted method
}
Version 0.13.0 brought improved DSL, so we can set generic type for whole scenario.
This works great, but the only thing missing is type-casts in hooks. This issue suggests extend generic types and smart-casts to hooks. Expected DSL, generic types in handle:
handle<BeforeActionHook>(telegram) { // declare token same as in action
reactions.document("...") // use smart-casted reactions/request/activator same as in action
}
, and generic types propagation from Scenario:
val bot =Scenario(telegram) {
handle<BeforeActionHook> { // handle uses propagated request/reactions type
reactions.document("...")
}
}
The text was updated successfully, but these errors were encountered:
Version 0.10.0 brought type-specific actions, e.g.:
Version 0.13.0 brought improved DSL, so we can set generic type for whole scenario.
This works great, but the only thing missing is type-casts in hooks. This issue suggests extend generic types and smart-casts to
hooks
. Expected DSL, generic types inhandle
:, and generic types propagation from Scenario:
The text was updated successfully, but these errors were encountered: