mapSource

fun <S, R, T> ArgumentCommandNode<S, T>.mapSource(mapper: (R) -> S): ArgumentCommandNode<R, T>

Converts the given ArgumentCommandNode with source type S to an ArgumentCommandNode with source type R.


Converts the given LiteralCommandNode with source type S to an LiteralCommandNode with source type R.


fun <S, R> RootCommandNode<S>.mapSource(mapper: (R) -> S): RootCommandNode<R>

Converts the given RootCommandNode with source type S to an RootCommandNode with source type R.


fun <S, R> CommandNode<S>.mapSource(mapper: (R) -> S): CommandNode<R>

Converts the given CommandNode with source type S to an CommandNode with source type R.

Only works for the standard node types: