diff --git a/common_front-end/types/independent.ts b/common_front-end/types/independent.ts index 1990ed661..b3b064e39 100644 --- a/common_front-end/types/independent.ts +++ b/common_front-end/types/independent.ts @@ -27,7 +27,7 @@ import type { */ export interface DeserializedPageContext extends Serializable { pageProps: { - userProfile: DeserializedUserProfile|null + userProfile: DeserializedUserProfile<"roles"|"department">|null } } diff --git a/shareable/types/server.ts b/shareable/types/server.ts index aea98bd45..ccc50aff0 100644 --- a/shareable/types/server.ts +++ b/shareable/types/server.ts @@ -65,7 +65,9 @@ type OptionalPageProps< interface RawPageProps extends Serializable { // Added to pass data from server to client - userProfile: T extends "deserialized" ? DeserializedUserProfile : Serializable|null + userProfile: T extends "deserialized" + ? DeserializedUserProfile<"roles"|"department"> + : Serializable|null roles: OptionalPageProps, role: OptionalPageProps