From 378e1fb56f942d9c6416bf96250b4c47acbd49e0 Mon Sep 17 00:00:00 2001 From: Philip Walton Date: Wed, 11 May 2022 16:43:47 -0700 Subject: [PATCH] Update aliasing method --- src/deprecated.ts | 78 +++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 36 deletions(-) diff --git a/src/deprecated.ts b/src/deprecated.ts index 4e3aeb2a..b77df4f6 100644 --- a/src/deprecated.ts +++ b/src/deprecated.ts @@ -14,45 +14,51 @@ * limitations under the License. */ -import {onCLS} from './onCLS.js'; -import {onFCP} from './onFCP.js'; -import {onFID} from './onFID.js'; -import {onINP} from './onINP.js'; -import {onLCP} from './onLCP.js'; -import {onTTFB} from './onTTFB.js'; -import {ReportCallback} from './types.js'; +export { + /** + * @deprecated Use `onFCP()` instead. + */ + onFCP as getFCP, +} from './onFCP.js'; -/** - * @deprecated Use `onCLS()` instead. - */ -export const getCLS = onCLS; - -/** - * @deprecated Use `onFCP()` instead. - */ -export const getFCP = onFCP; +export { + /** + * @deprecated Use `onFID()` instead. + */ + onFID as getFID, +} from './onFID.js'; -/** - * @deprecated Use `onFID()` instead. - */ -export const getFID = onFID; +export { + /** + * @deprecated Use `onCLS()` instead. + */ + onCLS as getCLS, +} from './onCLS.js'; -/** - * @deprecated Use `onINP()` instead. - */ -export const getINP = onINP; +export { + /** + * @deprecated Use `onINP()` instead. + */ + onINP as getINP, +} from './onINP.js'; -/** - * @deprecated Use `onLCP()` instead. - */ -export const getLCP = onLCP; +export { + /** + * @deprecated Use `onLCP()` instead. + */ + onLCP as getLCP, +} from './onLCP.js'; -/** - * @deprecated Use `onTTFB()` instead. - */ -export const getTTFB = onTTFB; +export { + /** + * @deprecated Use `onTTFB()` instead. + */ + onTTFB as getTTFB, +} from './onTTFB.js'; -/** - * @deprecated Use `ReportCallback` instead. - */ -export type ReportHandler = ReportCallback; +export { + /** + * @deprecated Use `ReportCallback` instead. + */ + ReportCallback as ReportHandler, +} from './types.js';