From 40b50c88a55badd72854bcaaa6179919f679b222 Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Fri, 25 Oct 2024 18:51:33 +0530 Subject: [PATCH] Remove type:"module" --- projects/js-packages/wp-data-sync/package.json | 1 - projects/js-packages/wp-data-sync/src/create-wp-data-sync.ts | 2 -- projects/js-packages/wp-data-sync/src/index.ts | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/projects/js-packages/wp-data-sync/package.json b/projects/js-packages/wp-data-sync/package.json index e8c44223fc913..f8d574a52c807 100644 --- a/projects/js-packages/wp-data-sync/package.json +++ b/projects/js-packages/wp-data-sync/package.json @@ -12,7 +12,6 @@ "url": "https://github.com/Automattic/jetpack.git", "directory": "projects/js-packages/wp-data-sync" }, - "type": "module", "license": "GPL-2.0-or-later", "author": "Automattic", "scripts": { diff --git a/projects/js-packages/wp-data-sync/src/create-wp-data-sync.ts b/projects/js-packages/wp-data-sync/src/create-wp-data-sync.ts index 57ab147fd9b7c..b7503d0cd55f7 100644 --- a/projects/js-packages/wp-data-sync/src/create-wp-data-sync.ts +++ b/projects/js-packages/wp-data-sync/src/create-wp-data-sync.ts @@ -245,7 +245,6 @@ export function createWpDataSync< Shape extends object, Name extends string >( setStatus( 'fetching' ); try { - // @ts-expect-error apiFetch is callable const response = await apiFetch< Response >( { path: endpoint } ); const result = extractFetchResponse?.( response ) ?? response; @@ -274,7 +273,6 @@ export function createWpDataSync< Shape extends object, Name extends string >( const data = prepareUpdateRequest?.( payload ) ?? payload; - // @ts-expect-error apiFetch is callable await apiFetch( { method: 'POST', path: endpoint, data } ); setStatus( 'idle' ); diff --git a/projects/js-packages/wp-data-sync/src/index.ts b/projects/js-packages/wp-data-sync/src/index.ts index 6d9bf3d7e840d..65554ce6a182f 100644 --- a/projects/js-packages/wp-data-sync/src/index.ts +++ b/projects/js-packages/wp-data-sync/src/index.ts @@ -1 +1 @@ -export * from './create-wp-data-sync.js'; +export * from './create-wp-data-sync';