Skip to content

Instantly share code, notes, and snippets.

View bishoymelek-zz's full-sized avatar
🎯
Focusing

Bishoy Melek bishoymelek-zz

🎯
Focusing
  • Cairo,Egypt
View GitHub Profile
@itsdouges
itsdouges / hoc-wrapping-component-with-default-props.tsx
Last active January 27, 2020 19:49
Passing default props info through a HOC using TypeScript 3.1.x
import * as React from 'react';
type Omit<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
type ExtractProps<TComponentOrTProps> = TComponentOrTProps extends React.ComponentType<
infer P
>
? P
: never;
interface InjectedProps {
@afternoon
afternoon / rename_js_files.sh
Created February 15, 2014 18:04
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;