{ "Print a variable to the console": { "prefix": "logv", "body": [ "console.log('${1:VALUE}', ${1});$0" ], "description": "Log value to console" }, "Print a message to the console": { "prefix": "logm", "body": [ "console.log('${1:MESSAGE}');$0" ], "description": "Log message to console" }, "React Component template": { "prefix": "component", "body": [ "import React from 'react';", "import { I${1:COMPONENT_NAME}Props } from './${2:COMPONENT_NAME_LOWER}.props.interface';", "import { I${1}State } from './${2}.state.interface';", "", "const styles = require('./${2}.module.less');", "", "/**", " * ${3:DESCRIPTION}", " */", "export class ${1} extends React.Component<I${1}Props, I${1}State> {", " ", " constructor(props: I${1}Props) {", " super(props);", " }", " ", " public render(): JSX.Element {", " return (", " <div>$0</div>", " );", " }", "}" ], "description": "Add React Component template" }, "Component spec template": { "prefix": "spec-component", "body": [ "import React from 'react';", "import { shallow } from 'enzyme';", "import { ${1:COMPONENT_NAME} } from './${2:COMPONENT_NAME_LOWER}.component';", "import { I${1}Props } from './${2}.props.interface';", "", "describe('Components', () => {", " describe('${1}', () => {", " ", " let props: I${1}Props = null;", " ", " beforeEach(() => {", " props = {", " $0", " };", " });", " ", " it('should ', () => {", " const component = shallow(<${1} {...props} />);", " expect();", " });", " });", "});" ], "description": "Add Jest spec template for React Component" }, "Spec test template": { "prefix": "test", "body": [ "it('should ${1:SCENARIO}', () => {", " const component = shallow(<${2:COMPONENT_NAME} {...props} />);", " $0", " expect();", "});" ], "description": "Jest component test template" }, "Import": { "prefix": "import", "body": [ "import { ${1:MODULE_NAME} } from '${2:MODULE_FILE_NAME}';" ], "description": "Add import statement" }, "Import *": { "prefix": "import*", "body": [ "import * as ${1:MODULE_NAME} from '${2:MODULE_FILE_NAME}';" ], "description": "Add import * import statement" } }