Pass type constructor to fromPathPiece