(cacheType?: string)
| 772 | } |
| 773 | |
| 774 | function normalizeCacheType(cacheType?: string): ArtifactCacheType { |
| 775 | if (cacheType === undefined) { |
| 776 | return "cache"; |
| 777 | } |
| 778 | const normalized = cacheType.toLowerCase(); |
| 779 | if (normalized === "cache") { |
| 780 | return "cache"; |
| 781 | } |
| 782 | if (normalized === "indexeddb") { |
| 783 | return "indexeddb"; |
| 784 | } |
| 785 | if (normalized === "cross-origin") { |
| 786 | return "cross-origin"; |
| 787 | } |
| 788 | if (normalized === "opfs") { |
| 789 | return "opfs"; |
| 790 | } |
| 791 | console.error("Unsupported cacheType: " + cacheType + ", using default ArtifactCache."); |
| 792 | return "cache"; |
| 793 | } |
| 794 | |
| 795 | function isTensorCacheAccessOptions( |
| 796 | value: string | TensorCacheAccessOptions | undefined, |
no test coverage detected
searching dependent graphs…