import * as vscode from 'vscode' ; import { ICommandTypes } from './commands' ; param ns param key param fn returns see Thanks export default function registerCommand < K extends keyof ICommandTypes > ( ns , key , fn ) { return ns . registerCommand ( key , fn ) ; }