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
Show hidden characters
| { | |
| "Use State": { | |
| "prefix": "us", | |
| "scope": "javascript,javascriptreact,typescript,typescriptreact", | |
| "body": [ | |
| "const [${1}, set${1/(.*)/${1:/capitalize}/}] = useState($2);", | |
| "$0" | |
| ], | |
| "description": "(EXPERIMENTAL) React: Use State. See https://reactjs.org/hooks" | |
| } |
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
| type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; | |
| export function withAppContext< | |
| P extends { appContext?: AppContextInterface }, | |
| R = Omit<P, 'appContext'> | |
| >( | |
| Component: React.ComponentClass<P> | React.StatelessComponent<P> | |
| ): React.SFC<R> { | |
| return function BoundComponent(props: R) { | |
| return ( |
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
| const readline = require('readline'); | |
| const mike = readline.createInterface({ | |
| input: process.stdin, | |
| output: process.stdout | |
| }); | |
| // var person = function(personName,personAge){ | |
| // let name = personName; | |
| // let age = personAge; |