example export interface TileSetNameComponents { name : string ; default see TileMetadataNamedTag . Production layer ? : string ; } export const TileSetNameParser = { example param name parse ( name ) { const output = { name } ; const layerIndex = name . indexOf ( ':' ) ; if ( layerIndex !== - 1 ) { output . layer = output . name . substring ( layerIndex + 1 ) ; output . name = output . name . substring ( 0 , layerIndex ) ; } return output ; } , componentsToName ( components ) { return TileSetNameParser . toName ( components . name , components . layer ) ; } , toName ( name , layer ? ) { const output = [ name ] ; if ( layer ) output . push ( `:${ layer }` ) ; return output . join ( '' ) ; } , } ;