dev: fix core profiler context ts type error (#39749)

This commit is contained in:
RJ 2023-08-16 22:19:51 +10:00 committed by GitHub
parent 2926acb521
commit 99182c015c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -186,6 +186,9 @@ export type CoreProfilerStateMachineContext = {
};
onboardingProfile: OnboardingProfile;
jetpackAuthUrl?: string;
persistBusinessInfoRef?: ReturnType< typeof spawn >;
spawnUpdateOnboardingProfileOptionRef?: ReturnType< typeof spawn >;
spawnGeolocationRef?: ReturnType< typeof spawn >;
};
const getAllowTrackingOption = async () =>
@ -315,7 +318,6 @@ const getGeolocation = async ( context: CoreProfilerStateMachineContext ) => {
};
const preFetchGeolocation = assign( {
// @ts-expect-error -- TODO fix this type issue.
spawnGeolocationRef: ( context: CoreProfilerStateMachineContext ) =>
spawn(
() => getGeolocation( context ),
@ -387,7 +389,6 @@ const updateOnboardingProfileOption = (
};
const spawnUpdateOnboardingProfileOption = assign( {
// @ts-expect-error -- TODO fix this type issue.
spawnUpdateOnboardingProfileOptionRef: (
context: CoreProfilerStateMachineContext
) =>
@ -439,7 +440,6 @@ const updateBusinessInfo = async (
};
const persistBusinessInfo = assign( {
// @ts-expect-error -- TODO fix this type issue.
persistBusinessInfoRef: (
context: CoreProfilerStateMachineContext,
event: BusinessInfoEvent

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fixed TS type error for state machine Context in Core Profiler that only got caught after TS5 upgrade