sicua
Version:
A tool for analyzing project structure and dependencies
36 lines (35 loc) • 1.13 kB
TypeScript
import ts from "typescript";
import { TypeSignature } from "../types/internalTypes";
/**
* Utilities for generating and manipulating type signatures
*/
export declare class TypeSignatureUtils {
/**
* Generate a structural signature for a type node
*/
static generateTypeSignature(node: ts.Node): TypeSignature;
/**
* Simple hash function for strings
*/
static hashString(str: string): string;
/**
* Compare two type signatures for structural equality
*/
static areSignaturesEqual(a: TypeSignature, b: TypeSignature): boolean;
/**
* Check if a type is a subtype of another by signature
*/
static isSubtypeOf(subType: TypeSignature, superType: TypeSignature): boolean;
/**
* Get property overlap between two type signatures
*/
static getPropertyOverlap(a: TypeSignature, b: TypeSignature): {
common: string[];
onlyInA: string[];
onlyInB: string[];
};
/**
* Create a merged signature from multiple type signatures
*/
static mergeTypeSignatures(signatures: TypeSignature[]): TypeSignature;
}