Note:
<example>is meant to denote text replaced by you (including brackets).
// global dependencies
npm install -g knex| /** | |
| * Copyright (c) 2015-present, Facebook, Inc. | |
| * | |
| * This source code is licensed under the MIT license found in the | |
| * LICENSE file in the root directory of this source tree. | |
| * | |
| * @format | |
| */ | |
| 'use strict'; |
| // ./SomeClass.ts | |
| export default class SomeClass { | |
| public static myMethod(params: any) { | |
| ... do something | |
| } | |
| } | |
| // ./SomeComponent.tsx |
| async function doSomething(data) { | |
| if(data.ok) { | |
| return await db.insert(data) | |
| } | |
| if(typeof data === 'string') { | |
| return new Alert(data) | |
| } | |
| if(data.type === 'result') { |