433
434
export function isUriComponents(thing: unknown): thing is UriComponents {
435
>
if (!thing || typeof thing !== 'object') {
uri.ts
436
return false;
437
}
438
>
return typeof (<UriComponents>thing).scheme === 'string'
uri.ts
439
&& (typeof (<UriComponents>thing).authority === 'string' || typeof (<UriComponents>thing).authority === 'undefined')
440
&& (typeof (<UriComponents>thing).path === 'string' || typeof (<UriComponents>thing).path === 'undefined')
441
&& (typeof (<UriComponents>thing).query === 'string' || typeof (<UriComponents>thing).query === 'undefined')
442
&& (typeof (<UriComponents>thing).fragment === 'string' || typeof (<UriComponents>thing).fragment === 'undefined');
444
445
interface UriState extends UriComponents {