import { VersionRanges } from './VersionRanges' ; export enum ResolutionType { Available = 'available' , LoadFrom = 'load-from' } export type Resolution = { type : ResolutionType . Available ; id : string ; } | { type : ResolutionType . LoadFrom ; url : string ; } ; export interface Resolver { registerId ( id ) : void ; registerResolvedURL ( url , id ) : void ; resolve ( request , parentId ? , defaultPackageVersionRanges ? ) : Resolution ; }