Add encode type declaration