import { UrlGeneratorId , UrlGeneratorStateMapping } from './url_generator_definition' ; export interface UrlGeneratorContract < Id extends UrlGeneratorId > { id : Id ; createUrl ( state ) : Promise < string > ; isDeprecated : boolean ; migrate ( state ) : Promise < { state : UrlGeneratorStateMapping [ Id ] [ 'MigratedState' ] ; id : UrlGeneratorStateMapping [ Id ] [ 'MigratedId' ] ; } > ; }