/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { EnrichedError } from './ErrorUtils'; import type { GenericClazz } from './CommonUtils'; export declare class AssertionError extends EnrichedError { constructor(error: string | Error | undefined, message?: string); } export declare const isNonNullable: (value: T | null | undefined) => value is T; export declare function assertNonNullable(value: T | null | undefined, message?: string): asserts value is T; export declare const guaranteeNonNullable: (value: T | null | undefined, message?: string) => T; export declare const isType: (value: unknown, clazz: GenericClazz) => value is T; export declare function assertType(value: unknown, clazz: GenericClazz, message?: string): asserts value is T; export declare const guaranteeType: (value: unknown, clazz: GenericClazz, message?: string) => T; export declare function assertNonEmptyString(str: string | null | undefined, message?: string): asserts str is string; export declare function guaranteeNonEmptyString(str: string | null | undefined, message?: string): string; export declare function assertTrue(assertionValue: boolean, message?: string): asserts assertionValue is true; export declare const isString: (val: unknown) => val is string; export declare const isNumber: (val: unknown) => val is number; export declare const isBoolean: (val: unknown) => val is boolean; export declare const isObject: (val: unknown) => val is object; export declare function assertIsString(val: unknown, message?: string): asserts val is string; export declare const guaranteeIsString: (val: unknown, message?: string) => string; export declare function assertIsNumber(val: unknown, message?: string): asserts val is number; export declare const guaranteeIsNumber: (val: unknown, message?: string) => number; //# sourceMappingURL=AssertionUtils.d.ts.map