Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am g-rath on github.
  • I am grath (https://keybase.io/grath) on keybase.
  • I have a public key ASB-tE9YcO957Lqd68Kg0TxYEBfSjO5xVVhhNcKh1mYgwgo

To claim this, I am signing this object:

declare class ReactTrelloBoard<CardMetaData> extends React.Component<ReactTrello.BoardProps<CardMetaData>> {
}
declare module ReactTrello {
/**
* react-trello uses `React.cloneElement`, so these props
* will have to be added to `defaultProps`, otherwise
* TypeScript will (understandably) freak out.
*/
interface NewCardTemplateProps<CardMetaData = object> {
@G-Rath
G-Rath / definitions.ts
Last active May 6, 2019 23:43
useful typescript types & files
/*
Lets you extract the properties of an interface that are of a specific type,
such as "this parameter takes the name of any propert of T that maps to a string value".
See "groupObjectsByProperty.ts" for an example.
*/
// region ExtractPropertiesOfType
type FilterFlags<O, T> = { [K in keyof O]: O[K] extends T ? K : never };
type AllowedNames<O, T> = FilterFlags<O, T>[keyof O];
/// <reference types="jest" />
import { mocked as mockedCore } from 'ts-jest';
declare type MockableFunction = (...args: any[]) => any
declare type MethodKeysOf<T> = { [K in keyof T]: T[K] extends MockableFunction ? K : never }[keyof T]
declare type PropertyKeysOf<T> = { [K in keyof T]: T[K] extends MockableFunction ? never : K }[keyof T]
declare type ArgumentsOf<T> = T extends (...args: infer A) => any ? A : never
declare type ConstructorArgumentsOf<T> = T extends new (...args: infer A) => any ? A : never
interface MockWithArgs<T extends MockableFunction> extends jest.MockInstance<ReturnType<T>, ArgumentsOf<T>> {
declare module 'picomatch' {
namespace picomatch {
type ExpandRangeFn = (start: string, end: string) => string;
type FormatFn = (str: string) => string;
type ResultHandler = (result: Result) => void;
interface Result {
glob: string;
regex: RegExp;
sudo apt uninstall nodejs
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt install node
npm i -g npm
npx @nodenv/nodenv-installer
[automount]
root = /
options = "metadata"
@G-Rath
G-Rath / .npmrc
Created January 31, 2020 22:49
docker-compose error repo
cache=/var/myapp/.npm