auto-calculate typeExtension.