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
export type MaterialIcons = | |
| '10k' | |
| '10mp' | |
| '11mp' | |
| '12mp' | |
| '13mp' | |
| '14mp' | |
| '15mp' | |
| '16mp' | |
| '17mp' |
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
export class Board { | |
public size: number; | |
protected board: (null | 'o' | 'x')[]; | |
constructor(size: number = 3) { | |
this.size = size; | |
this.board = Array(size * size).fill(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
/** | |
* useAsync<T>(asyncFunc, options) | |
* @arg asyncFunc: (variables: Options) => Promise<T> Asynchronous function to be called | |
* @arg options: Options: { Options. The hook will only call | |
* skip: boolean; the asyncFunc when `skip=false`. | |
* variables: { [key: string]: any } `variables` will be passed to the | |
* } function whe it's called. | |
* | |
* @returns [ executeFunction, asyncState ] | |
* --- |
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
/** | |
* useLazyAsync<T>(asyncFunc, options) | |
* @arg asyncFunc: (variables: Options) => Promise<T> Asynchronous function to be called | |
* @arg options: Options: {variables: { [key: string]: any }} Options. `variables` will be passed | |
* to the function whe it's called | |
* @returns [ executeFunction, asyncState ] | |
* --- | |
* Usage: | |
* const [execute, state] = useLazyAsync( | |
* ({ name }) => new Promise((res, rej) => res(`Hello, ${name}`)), |
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 { omit } from 'lodash'; | |
const filter = () => true; | |
const getUndefined = () => {}; | |
const getType = (action) => action.type; | |
const identity = (x) => x; | |
const createSentryMiddleware = (Sentry, options = {}) => { | |
const { | |
actionTransformer = identity, |