'use strict' ; export const separator = ':' ; export interface TscMoniker { /**
     * The symbol name of the moniker.
     */ name : string ; /**
     * The path of the moniker;
     */ path ? : string ; } export namespace TscMoniker { export const scheme = 'tsc' ; export function parse ( identifier ) { let index = identifier . lastIndexOf ( separator ) ; if ( index === - 1 ) { return { name : identifier } ; } return { name : identifier . substring ( index + 1 ) , path : identifier . substr ( 0 , index ) . replace ( /::/g , ':' ) } ; } export function create ( name , path ? ) { if ( ! path ) { return name ; } return `${ escape ( path ) }${ separator }${ name }` ; } export function hasPath ( moniker ) { return ! ! moniker . path ; } } export namespace NpmMoniker { export const scheme = 'npm' ; export function create ( module , path , name ) { return `${ module }${ separator }${ path !== undefined ? escape ( path ) : '' }${ separator }${ name }` ; } } function escape ( value ) { return value . replace ( /:/g , '::' ) ; }