Skip to content

Commit 161da07

Browse files
committed
move Queue types from core to bundle implementation
1 parent 95b4055 commit 161da07

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

bundle/src/lib/guardian-commercial-queue.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ const createCommercialQueue = (queueArr: QueueItem[] = []): Queue => {
4040
};
4141

4242
export { createCommercialQueue };
43+
export type { Queue, QueueItem };

bundle/src/types/global.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import type {
1313
NSdkInstance,
1414
OphanRecordFunction,
1515
OptOutInitializeOptions,
16-
Queue,
1716
SafeFrameAPI,
1817
TeadsAnalytics,
1918
Trac,
2019
} from '@guardian/commercial-core/types';
2120
import type { CustomClaims } from '@guardian/identity-auth';
2221
import type { Advert } from '../define/Advert';
22+
import type { Queue } from '../lib/guardian-commercial-queue';
2323
import type { ThirdPartyTag } from '../lib/types';
2424

2525
type ServerSideABTest = `${string}${'Variant' | 'Control'}`;

core/src/types.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,6 @@ type AdmiralCallback = (event: AdmiralEvent) => void;
469469
type AdmiralArg = string | AdmiralCallback;
470470
type Admiral = (...args: AdmiralArg[]) => void;
471471

472-
type QueueItem = () => void;
473-
type Queue = {
474-
push: (...items: QueueItem[]) => QueueItem[];
475-
flush: () => void;
476-
};
477472

478473
interface CoreGuardian {
479474
config: Config;
@@ -532,5 +527,4 @@ export type {
532527
Admiral,
533528
AdmiralEvent,
534529
CoreGuardian,
535-
Queue,
536530
};

0 commit comments

Comments
 (0)