mlh-tsd
Version:
Check TypeScript type definitions
43 lines (42 loc) • 1.42 kB
TypeScript
/**
* Check that the type of `value` is identical to type `T`.
*
* @param value - Value that should be identical to type `T`.
*/
export declare const expectType: <T>(value: T) => void;
/**
* Check that the type of `value` is not identical to type `T`.
*
* @param value - Value that should be identical to type `T`.
*/
export declare const expectNotType: <T>(value: any) => void;
/**
* Check that the type of `value` is assignable to type `T`.
*
* @param value - Value that should be assignable to type `T`.
*/
export declare const expectAssignable: <T>(value: T) => void;
/**
* Check that the type of `value` is not assignable to type `T`.
*
* @param value - Value that should not be assignable to type `T`.
*/
export declare const expectNotAssignable: <T>(value: any) => void;
/**
* Assert the value to throw an argument error.
*
* @param value - Value that should be checked.
*/
export declare const expectError: <T = any>(value: T) => void;
/**
* Assert that the `expression` provided is marked as `@deprecated`.
*
* @param expression - Expression that should be marked as `@deprecated`.
*/
export declare const expectDeprecated: (expression: any) => void;
/**
* Assert that the `expression` provided is not marked as `@deprecated`.
*
* @param expression - Expression that should not be marked as `@deprecated`.
*/
export declare const expectNotDeprecated: (expression: any) => void;