Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 69 additions & 20 deletions common/reviews/api/node-core-library.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ export type Brand<T, BrandTag extends string> = T & {
__brand: BrandTag;
};

// @public
function convertTo(input: string, newlineKind: NewlineKind): string;

// @public
function convertToCrLf(input: string): string;

// @public
function convertToLf(input: string): string;

declare namespace Disposables {
export {
polyfillDisposeSymbols
Expand All @@ -74,6 +83,9 @@ export enum Encoding {
Utf8 = "utf8"
}

// @public
function ensureTrailingNewline(s: string, newlineKind?: NewlineKind): string;

// @public
export class Enum {
static getKeyByNumber<TEnumValue, TEnumObject extends {
Expand Down Expand Up @@ -107,6 +119,9 @@ export class EnvironmentMap {
unset(name: string): void;
}

// @public
function escapeRegExp(literal: string): string;

// @public
export class Executable {
static getProcessInfoById(): Map<number, IProcessInfo>;
Expand Down Expand Up @@ -249,6 +264,9 @@ export type FolderItem = fs.Dirent;
// @public
function getHomeFolder(): string;

// @public
function getNewline(newlineKind: NewlineKind): string;

// @public
export interface IAsyncParallelismOptions {
allowOversubscription?: boolean;
Expand Down Expand Up @@ -848,6 +866,12 @@ export class PackageNameParser {
validate(packageName: string): void;
}

// @public
function padEnd(s: string, minimumLength: number, paddingCharacter?: string): string;

// @public
function padStart(s: string, minimumLength: number, paddingCharacter?: string): string;

// @public
export class Path {
static convertToBackslashes(inputPath: string): string;
Expand Down Expand Up @@ -894,13 +918,25 @@ export class ProtectableMap<K, V> {
get size(): number;
}

// @public
function readLinesFromIterable(iterable: Iterable<string | Buffer | null>, options?: IReadLinesFromIterableOptions): Generator<string>;

// @public
function readLinesFromIterableAsync(iterable: AsyncIterable<string | Buffer>, options?: IReadLinesFromIterableOptions): AsyncGenerator<string>;

// @public
export class RealNodeModulePathResolver {
constructor(options?: IRealNodeModulePathResolverOptions);
clearCache(): void;
readonly realNodeModulePath: (input: string) => string;
}

// @public
function replaceAll(input: string, searchValue: string, replaceValue: string): string;

// @public
function reverse(s: string): string;

// @public
export class Sort {
static compareByValue(x: any, y: any): number;
Expand All @@ -913,6 +949,15 @@ export class Sort {
static sortSetBy<T>(set: Set<T>, keySelector: (element: T) => any, keyComparer?: (x: T, y: T) => number): void;
}

// @public
function splitByNewLines(s: undefined): undefined;

// @public
function splitByNewLines(s: string): string[];

// @public
function splitByNewLines(s: string | undefined): string[] | undefined;

// @public
export class StringBuilder implements IStringBuilder {
constructor();
Expand All @@ -927,27 +972,31 @@ export class SubprocessTerminator {
static readonly RECOMMENDED_OPTIONS: ISubprocessOptions;
}

// @public
export class Text {
static convertTo(input: string, newlineKind: NewlineKind): string;
static convertToCrLf(input: string): string;
static convertToLf(input: string): string;
static ensureTrailingNewline(s: string, newlineKind?: NewlineKind): string;
static escapeRegExp(literal: string): string;
static getNewline(newlineKind: NewlineKind): string;
static padEnd(s: string, minimumLength: number, paddingCharacter?: string): string;
static padStart(s: string, minimumLength: number, paddingCharacter?: string): string;
static readLinesFromIterable(iterable: Iterable<string | Buffer | null>, options?: IReadLinesFromIterableOptions): Generator<string>;
static readLinesFromIterableAsync(iterable: AsyncIterable<string | Buffer>, options?: IReadLinesFromIterableOptions): AsyncGenerator<string>;
static replaceAll(input: string, searchValue: string, replaceValue: string): string;
static reverse(s: string): string;
static splitByNewLines(s: undefined): undefined;
// (undocumented)
static splitByNewLines(s: string): string[];
// (undocumented)
static splitByNewLines(s: string | undefined): string[] | undefined;
static truncateWithEllipsis(s: string, maximumLength: number): string;
declare namespace Text {
export {
replaceAll,
convertToCrLf,
convertToLf,
convertTo,
NewlineKind,
getNewline,
padEnd,
padStart,
truncateWithEllipsis,
ensureTrailingNewline,
escapeRegExp,
Encoding,
IReadLinesFromIterableOptions,
readLinesFromIterableAsync,
readLinesFromIterable,
reverse,
splitByNewLines
}
}
export { Text }

// @public
function truncateWithEllipsis(s: string, maximumLength: number): string;

// @public
export class TypeUuid {
Expand Down
Loading