tsd
Version:
Check TypeScript type definitions
19 lines (18 loc) • 624 B
TypeScript
import { Node, Type, TypeChecker } from '@tsd/typescript';
import { Diagnostic } from '../interfaces';
interface DiagnosticWithDiffOptions {
checker: TypeChecker;
node: Node;
message: string;
expectedType: Type | string;
receivedType: Type | string;
severity?: Diagnostic['severity'];
}
/**
* Create a diagnostic with type error diffs from the given `options`, see {@link DiagnosticWithDiffOptions}.
*
* @param options - Options for creating the diagnostic.
* @returns Diagnostic with diffs
*/
declare const _default: (options: DiagnosticWithDiffOptions) => Diagnostic;
export default _default;