UNPKG

mlh-tsd

Version:

Check TypeScript type definitions

68 lines (67 loc) 2.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.expectNotDeprecated = exports.expectDeprecated = exports.expectError = exports.expectNotAssignable = exports.expectAssignable = exports.expectNotType = exports.expectType = void 0; /** * Check that the type of `value` is identical to type `T`. * * @param value - Value that should be identical to type `T`. */ // @ts-ignore exports.expectType = (value) => { // Do nothing, the TypeScript compiler handles this for us }; /** * Check that the type of `value` is not identical to type `T`. * * @param value - Value that should be identical to type `T`. */ // @ts-ignore exports.expectNotType = (value) => { // TODO Use a `not T` type when possible https://github.com/microsoft/TypeScript/pull/29317 // Do nothing, the TypeScript compiler handles this for us }; /** * Check that the type of `value` is assignable to type `T`. * * @param value - Value that should be assignable to type `T`. */ // @ts-ignore exports.expectAssignable = (value) => { // Do nothing, the TypeScript compiler handles this for us }; /** * Check that the type of `value` is not assignable to type `T`. * * @param value - Value that should not be assignable to type `T`. */ // @ts-ignore exports.expectNotAssignable = (value) => { // Do nothing, the TypeScript compiler handles this for us }; /** * Assert the value to throw an argument error. * * @param value - Value that should be checked. */ // @ts-ignore exports.expectError = (value) => { // Do nothing, the TypeScript compiler handles this for us }; /** * Assert that the `expression` provided is marked as `@deprecated`. * * @param expression - Expression that should be marked as `@deprecated`. */ // @ts-ignore exports.expectDeprecated = (expression) => { // Do nothing, the TypeScript compiler handles this for us }; /** * Assert that the `expression` provided is not marked as `@deprecated`. * * @param expression - Expression that should not be marked as `@deprecated`. */ // @ts-ignore exports.expectNotDeprecated = (expression) => { // Do nothing, the TypeScript compiler handles this for us };