@microsoft.azure/autorest.incubator
Version:
AutoRest incubator project
45 lines • 2.74 kB
TypeScript
import { Dictionary } from '#common/dictionary';
import { TextPossibilities } from '#common/file-generator';
export declare const lineCommentPrefix = "//";
export declare const docCommentPrefix = "///";
export declare const EOL = "\n";
export declare const CommaChar = ", ";
declare global {
interface Array<T> {
joinWith(selector: (t: T) => string, separator?: string): string;
}
interface String {
capitalize(): string;
uncapitalize(): string;
slim(): string;
}
}
export declare function joinComma<T>(items: Array<T>, mapFn: (item: T) => string): string;
export declare function join<T>(items: Array<T>, separator: string): string;
export interface IHasName {
name: string;
}
export declare function sortByName(a: IHasName, b: IHasName): number;
export declare function setIndentation(spaces: number): void;
export declare function trimDots(content: string): string;
export declare function toMap<T>(source: Array<T>, eachFn: (item: T) => string): Map<string, Array<T>>;
export declare function docComment(content: string, prefix?: string, factor?: number, maxLength?: number): string;
export declare function comment(content: string, prefix?: string, factor?: number, maxLength?: number): string;
export declare function dotCombine(prefix: string, content: string): string;
export declare function fixEOL(content: string): string;
export declare function map<T, U>(dictionary: Dictionary<T>, callbackfn: (key: string, value: T) => U, thisArg?: any): Array<U>;
export declare function ToMap<T>(dictionary: Dictionary<T>): Map<string, T>;
export declare function selectMany<T>(multiArray: Array<T>[]): Array<T>;
export declare function indent(content: string, factor?: number): string;
export declare function all<T, U>(array: Array<T>, callbackfn: (value: T, index: number, array: Array<T>) => Promise<U>, thisArg?: any): Promise<Array<U>>;
export declare function hasProperties(obj: any): boolean;
export declare function deconstruct(identifier: string | Array<string>): Array<string>;
export declare function fixLeadingNumber(identifier: Array<string>): Array<string>;
export declare function convert(num: number): Iterable<string>;
export declare function camelCase(identifier: Array<string>): string;
export declare function pascalCase(identifier: Array<string>): string;
export declare function escapeString(text: string | undefined): string;
/** emits c# to get the name of a property - uses nameof when it can, and uses a literal when it's an array value. */
export declare function nameof(text: string): string;
export declare function setRegion(source: string, region: string, content: TextPossibilities, prepend?: boolean): string;
//# sourceMappingURL=text-manipulation.d.ts.map