Renamed createOrReplaceType as declareType