refactor: updates based on the provider methods signature changes
This commit is contained in:
@@ -17,3 +17,19 @@ export type HoppInheritedProperty = {
|
||||
inheritedHeader: HoppRESTHeader | GQLHeader
|
||||
}[]
|
||||
}
|
||||
|
||||
type ModifiedAuth<T, AuthType> = {
|
||||
[K in keyof T]: K extends 'inheritedAuth' ? Extract<T[K], AuthType> : T[K]
|
||||
}
|
||||
|
||||
type ModifiedHeaders<T, HeaderType> = {
|
||||
[K in keyof T]: K extends 'inheritedHeader' ? Extract<T[K], HeaderType> : T[K]
|
||||
}
|
||||
|
||||
type ModifiedHoppInheritedProperty<AuthType, HeaderType> = {
|
||||
auth: ModifiedAuth<HoppInheritedProperty['auth'], AuthType>
|
||||
headers: ModifiedHeaders<HoppInheritedProperty['headers'][number], HeaderType>[]
|
||||
}
|
||||
|
||||
export type HoppInheritedRESTProperty = ModifiedHoppInheritedProperty<HoppRESTAuth, HoppRESTHeader>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user