Fix StartOS 0.4 TypeScript packaging to match SDK API
This commit is contained in:
+42
@@ -0,0 +1,42 @@
|
||||
import { Options } from './options';
|
||||
/**
|
||||
* Result of object-hash hashing function
|
||||
*/
|
||||
type HashedObject = string;
|
||||
/**
|
||||
* Type for normalized input.
|
||||
*/
|
||||
export type Normalized<T> = HashedObject | T;
|
||||
/**
|
||||
* Class that normalizes object types to strings via hashing
|
||||
*/
|
||||
export declare class Normalizer<K, V, TxK, TxV> {
|
||||
private readonly objectHashOptions;
|
||||
private readonly caseInsensitive;
|
||||
private readonly keyTransformer;
|
||||
private readonly valueTransformer;
|
||||
private readonly optionsChecksum;
|
||||
constructor(options?: Options<K, V, TxK, TxV>);
|
||||
/**
|
||||
* @returns the checksum for the options passed to this Normalizer
|
||||
*/
|
||||
getOptionsChecksum(): string;
|
||||
/**
|
||||
* Normalize the input by transforming and then hashing the result (if an object)
|
||||
* @param input the input to normalize
|
||||
* @returns the normalized result
|
||||
*/
|
||||
normalizeKey(input: K): Normalized<TxK>;
|
||||
/**
|
||||
* Normalize the input by transforming and then hashing the result (if an object)
|
||||
* @param input the input to normalize
|
||||
* @returns the normalized result
|
||||
*/
|
||||
normalizeValue(input: V): Normalized<TxV>;
|
||||
private normalizeHelper;
|
||||
/**
|
||||
* Returns true if the input is a javascript object.
|
||||
*/
|
||||
private static isObject;
|
||||
}
|
||||
export {};
|
||||
Reference in New Issue
Block a user