This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare module 'styled-transition-group' { | |
| import type { TransitionProps as TProps } from 'react-transition-group/Transition'; | |
| import type { | |
| AnyStyledComponent, | |
| DefaultTheme as Theme, | |
| StyledComponentInnerAttrs, | |
| StyledComponentInnerComponent, | |
| StyledComponentInnerOtherProps, | |
| ThemedStyledFunction, | |
| } from 'styled-components'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import isEqual from "lodash/isEqual"; | |
| import isObject from "lodash/isObject"; | |
| const flattenPaths = (value, path = []) => { | |
| if (!isObject(value)) { | |
| return { [path.join(".")]: value }; | |
| } | |
| if (Array.isArray(value)) { | |
| return value.reduce((cumulative, item) => { | |
| cumulative[`${path.join(".")}[value eq "${item.value}"]`] = item; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { batch } from 'react-redux'; | |
| import { | |
| Action, | |
| AnyAction, | |
| Middleware, | |
| ThunkAction, | |
| ThunkDispatch, | |
| } from '@reduxjs/toolkit'; | |
| type MaybeThunkAction<T> = T extends Action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import set from "lodash/set"; | |
| import { createAction, createSlice } from "@reduxjs/toolkit"; | |
| import { all, fork } from "redux-saga/effects"; | |
| const isValidFeatureSaga = saga => | |
| typeof saga === "function" || typeof saga?.worker === "function"; | |
| const getType = (featureName, actionKey) => `${featureName}/${actionKey}`; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useEffect, useRef, useState } from "react"; | |
| type VideoEventListenerMap = { | |
| [EventName in keyof HTMLMediaElementEventMap]?: EventListener; | |
| }; | |
| const useVideoFrames = ( | |
| frameCallback = (videoTime: number) => {} | |
| ): [HTMLVideoElement | null, React.RefCallback<HTMLVideoElement>] => { | |
| const [video, setVideo] = useState<HTMLVideoElement | null>(null); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * `Multiples`, `Scales` & `Aliases` types from | |
| * [@styled-system/css](https://github.com/styled-system/styled-system/blob/master/packages/css/src/index.js) | |
| */ | |
| declare module "@styled-system/css" { | |
| import * as CSS from "csstype"; | |
| export interface Theme {} | |
| type CSSPropertiesFallback = CSS.PropertiesFallback<number | string>; |