typed decoder