Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > LegacyAdapters

LegacyAdapters class

Helper functions used when interacting with APIs that do not follow modern coding practices.

Signature:

export declare class LegacyAdapters 

Methods

Method

Modifiers

Description

convertCallbackToPromise(fn)

static

This function wraps a function with a callback in a promise.

convertCallbackToPromise(fn, arg1)

static

convertCallbackToPromise(fn, arg1, arg2)

static

convertCallbackToPromise(fn, arg1, arg2, arg3)

static

convertCallbackToPromise(fn, arg1, arg2, arg3, arg4)

static

scrubError(error)

static

Normalizes an object into an Error object.