MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / isUrlLoadErrorType

Function isUrlLoadErrorType

src/hooks/urlLoaderErrorHandling.ts:24–36  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

22}
23
24function isUrlLoadErrorType(value: unknown): value is UrlLoadErrorType {
25 switch (value) {
26 case 'network':
27 case 'cors':
28 case 'not_found':
29 case 'invalid_manifest':
30 case 'timeout':
31 case 'unknown':
32 return true;
33 default:
34 return false;
35 }
36}
37
38function isOptionalString(value: unknown): value is string | undefined {
39 return value === undefined || typeof value === 'string';

Callers 1

isUrlLoadErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected