refactor: update provider method signature
This commit is contained in:
@@ -19,17 +19,22 @@ export type HoppInheritedProperty = {
|
||||
}
|
||||
|
||||
type ModifiedAuth<T, AuthType> = {
|
||||
[K in keyof T]: K extends 'inheritedAuth' ? Extract<T[K], AuthType> : T[K]
|
||||
[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]
|
||||
[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>[]
|
||||
auth: ModifiedAuth<HoppInheritedProperty["auth"], AuthType>
|
||||
headers: ModifiedHeaders<
|
||||
HoppInheritedProperty["headers"][number],
|
||||
HeaderType
|
||||
>[]
|
||||
}
|
||||
|
||||
export type HoppInheritedRESTProperty = ModifiedHoppInheritedProperty<HoppRESTAuth, HoppRESTHeader>
|
||||
|
||||
export type HoppInheritedRESTProperty = ModifiedHoppInheritedProperty<
|
||||
HoppRESTAuth,
|
||||
HoppRESTHeader
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user