UNPKG

sicua

Version:

A tool for analyzing project structure and dependencies

39 lines (38 loc) 1.2 kB
import { TypeDefinition } from "../types/internalTypes"; /** * Utilities for generating and working with type names */ export declare class NamingUtils { /** * Find the longest common prefix in an array of strings */ static findLongestCommonPrefix(strings: string[]): string; /** * Find a suggested name for a unified type based on component names */ static findSuggestedName(typeNames: string[]): string; /** * Find the common directory ancestor for a list of file paths */ static findCommonDirectory(filePaths: string[]): string; /** * Suggest a better name for a type based on its content and usage */ static suggestBetterTypeName(typeDef: TypeDefinition, componentContext?: string): string; /** * Check if a type name is too generic */ private static isGenericName; /** * Get type suffix (Props, Options, etc.) from type name */ private static getTypeSuffix; /** * Infer domain name from properties */ private static inferDomainFromProps; /** * Determine if a name is better than another */ static isBetterName(name1: string, name2: string): boolean; }