@shapediver/sdk.sdtf-core
Advanced tools
Comparing version
@@ -0,4 +1,9 @@ | ||
export declare const SdtfErrorType: { | ||
readonly Generic: "sd_sdtf_generic"; | ||
}; | ||
export type SdtfErrorType = typeof SdtfErrorType[keyof typeof SdtfErrorType]; | ||
export declare class SdtfError extends Error { | ||
readonly errorType: SdtfErrorType; | ||
constructor(message: string); | ||
} | ||
//# sourceMappingURL=SdtfError.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SdtfError = void 0; | ||
exports.SdtfError = exports.SdtfErrorType = void 0; | ||
exports.SdtfErrorType = { | ||
Generic: "sd_sdtf_generic", | ||
}; | ||
class SdtfError extends Error { | ||
constructor(message) { | ||
super(message); | ||
this.errorType = exports.SdtfErrorType.Generic; | ||
} | ||
@@ -8,0 +12,0 @@ } |
@@ -0,1 +1,4 @@ | ||
import { SdtfError } from "../SdtfError"; | ||
/** Type guard for all error types of the sdTF package. */ | ||
export declare function isSdtfError(e: any): e is SdtfError; | ||
/** | ||
@@ -2,0 +5,0 @@ * Function to indicate unreachable paths to the TypeScript compiler. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.tryDeepCopy = exports.enumValues = exports.enumKeys = exports.sdAssertUnreachable = void 0; | ||
exports.tryDeepCopy = exports.enumValues = exports.enumKeys = exports.sdAssertUnreachable = exports.isSdtfError = void 0; | ||
const SdtfError_1 = require("../SdtfError"); | ||
/** Type guard for all error types of the sdTF package. */ | ||
function isSdtfError(e) { | ||
return e instanceof Error && | ||
"errorType" in e && | ||
Object.values(SdtfError_1.SdtfErrorType).includes(e.errorType); | ||
} | ||
exports.isSdtfError = isSdtfError; | ||
/** | ||
@@ -6,0 +13,0 @@ * Function to indicate unreachable paths to the TypeScript compiler. |
{ | ||
"name": "@shapediver/sdk.sdtf-core", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "Base implementation for all sdTF TypeScript SDKs", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
106779
1.24%1197
1.61%