Convert inputs on Export/Import Room Key dialogs to be real Fields (#9350)
* Convert inputs on Export/Import Room Key dialogs to be real Fields Fixes https://github.com/vector-im/element-web/issues/18517 * Correctly label the second field * Appease the linter
This commit is contained in:
parent
99488b84ec
commit
1032334b20
3 changed files with 61 additions and 51 deletions
|
@ -49,3 +49,8 @@ export type KeysWithObjectShape<Input> = {
|
|||
? (Input[P] extends Array<unknown> ? never : P)
|
||||
: never;
|
||||
}[keyof Input];
|
||||
|
||||
export type KeysStartingWith<Input extends object, Str extends string> = {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
[P in keyof Input]: P extends `${Str}${infer _X}` ? P : never; // we don't use _X
|
||||
}[keyof Input];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue