Skip to content

Commit

Permalink
Remove type:"module"
Browse files Browse the repository at this point in the history
  • Loading branch information
manzoorwanijk committed Oct 25, 2024
1 parent d205915 commit 40b50c8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion projects/js-packages/wp-data-sync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 0 additions & 2 deletions projects/js-packages/wp-data-sync/src/create-wp-data-sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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' );
Expand Down
2 changes: 1 addition & 1 deletion projects/js-packages/wp-data-sync/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './create-wp-data-sync.js';
export * from './create-wp-data-sync';

0 comments on commit 40b50c8

Please sign in to comment.