Urara-Blog/node_modules/.pnpm-store/v3/files/5e/155f3189a23a81f98c9ad5e7c43dc738a30667c2cf8016332d61c22ed171278d33cdbee14b46874bbfd7521dd397cdd31de9b81922772860714933aed9152f
2022-08-14 01:14:53 +08:00

17 lines
No EOL
726 B
Text

import { TSESTree } from '@typescript-eslint/utils';
import * as ts from 'typescript';
/**
* Does a simple check to see if there is an any being assigned to a non-any type.
*
* This also checks generic positions to ensure there's no unsafe sub-assignments.
* Note: in the case of generic positions, it makes the assumption that the two types are the same.
*
* @example See tests for examples
*
* @returns false if it's safe, or an object with the two types if it's unsafe
*/
export declare function isUnsafeAssignment(type: ts.Type, receiver: ts.Type, checker: ts.TypeChecker, senderNode: TSESTree.Node | null): false | {
sender: ts.Type;
receiver: ts.Type;
};
//# sourceMappingURL=isUnsafeAssignment.d.ts.map