thrownewError('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
}
}elseif(_doubleSlashStart.test(ret.path)){
thrownewError('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
}else{
if(_doubleSlashStart.test(ret.path)){
thrownewError('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
}
}
}
}
...
...
@@ -114,17 +116,17 @@ export class URI implements UriComponents {
if(thinginstanceofURI){
returntrue;
}
if(thing){
returntypeof(<URI>thing).authority==='string'
&&typeof(<URI>thing).fragment==='string'
&&typeof(<URI>thing).path==='string'
&&typeof(<URI>thing).query==='string'
&&typeof(<URI>thing).scheme==='string'
&&typeof(<URI>thing).fsPath==='function'
&&typeof(<URI>thing).with==='function'
&&typeof(<URI>thing).toString==='function';
if(!thing){
returnfalse;
}
returnfalse;
returntypeof(<URI>thing).authority==='string'
&&typeof(<URI>thing).fragment==='string'
&&typeof(<URI>thing).path==='string'
&&typeof(<URI>thing).query==='string'
&&typeof(<URI>thing).scheme==='string'
&&typeof(<URI>thing).fsPath==='function'
&&typeof(<URI>thing).with==='function'
&&typeof(<URI>thing).toString==='function';
}
/**
...
...
@@ -279,17 +281,17 @@ export class URI implements UriComponents {