@dethcrypto/eth-sdk
Version:
🛠Generate type-safe, lightweight SDK for your Ethereum smart contracts
7 lines (6 loc) • 298 B
TypeScript
/**
* constrains argument type, without forgetting it
* @see https://kentcdodds.com/blog/how-to-write-a-constrained-identity-function-in-typescript
* @keywords partial, subset
*/
export declare const constrain: <Given extends unknown>() => <Inferred extends Given>(item: Inferred) => Inferred;