Check out example codes for "import exec ts". It will help you in understanding the concepts better.

Code Example 1

import { exec } from 'child_process';

Learn ReactJs, React Native from akashmittal.com