antlr-ng
Version:
Next generation ANTLR Tool
18 lines (17 loc) • 665 B
TypeScript
export type Constructor<T> = new (...args: unknown[]) => T;
export declare class Utils {
static stripFileExtension(name: string): string;
static sortLinesInString(s: string): string;
static capitalize(s: string): string;
static decapitalize(s: string): string;
static setSize(list: unknown[], size: number): void;
/**
* Type guard for accessing a member in an object without an index signature.
*
* @param obj The object to check.
* @param key The key to check.
*
* @returns True if the key is a member of the object.
*/
static hasKey: <T extends object>(obj: T, key: PropertyKey) => key is keyof T;
}