Class to functional component example 1 (#24181)

* Class to functional component example 1

* Fix lint and tests

* Fix

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Daniel Espino García
2023-10-05 09:39:54 +02:00
коммит произвёл GitHub
родитель 45ccd50f8c
Коммит e3823a3263
5 изменённых файлов: 215 добавлений и 160 удалений

Просмотреть файл

@@ -24,3 +24,6 @@ export type ValueOf<T> = T[keyof T];
*/
export type RequireOnlyOne<T, Keys extends keyof T = keyof T> =
Pick<T, Exclude<keyof T, Keys>> & {[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>}[Keys];
export type Intersection<T1, T2> =
Omit<Omit<T1&T2, keyof(Omit<T1, keyof(T2)>)>, keyof(Omit<T2, keyof(T1)>)>;