發表文章

目前顯示的是 2月 21, 2019的文章

Howard Grant (boxer)

圖片
Howard Grant Personal information Full name Howard Snake Grant Nationality   Canada Born ( 1966-06-22 ) June 22, 1966 (age 52) Saint Ann's Bay, Jamaica Height 1.80 m (5 ft 11 in) Weight 64 kg (141 lb) Sport Sport Boxing Rated at Light Welterweight Club Ring 83 Boxing Club Medal record World Amateur Championships 1986 Reno Light Welterweight Commonwealth Games 1986 Edinburgh Light Welterweight Howard Grant (born June 22, 1966 in Saint Ann, Jamaica) is a retired male Canadian boxer, competing in the light-welterweight (– 63.5 kg) division. A resident of Montréal, Quebec, he represented Canada at the 1988 Summer Olympics in Seoul, South Korea, where he was defeated in the second round by Sweden's Lars Myrberg. Grant won the gold medal in the same weight division, two years earlier, at the 1986 Commonwealth Games Howard is renowned for training top UFC Fighters and Professional Boxers. He and

Types of parameters 'err' and 'error' are incompatible. Type 'ExecException | null' is not assignable to type...

圖片
-1 Here is my program: import * as child_process from 'child_process' let global_npm_modules = '' const initial_command = 'npm ls -g --depth=0 --json' const shell = 'powershell' const callback = (err: Error, stdout: string | Buffer, stderr: string | Buffer) => { if (err) { console.log('There was an errornn', err) return } console.log(stdout) } child_process.exec(initial_command, {shell: shell}, callback) And tslint is complaining about callback in the last line giving the error: [ts] Argument of type '(err: Error, stdout: string | Buffer, stderr: string | Buffer) => void' is not assignable to parameter of type '(error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void'.