import * as vscode from 'vscode' ; import { VimState } from './vim_state_types' ; export function addTypeSubscription ( vimState , typeHandler ) { vimState . typeSubscription = vscode . commands . registerCommand ( 'type' , e => { typeHandler ( vimState , e . text ) ; } ) ; } export function removeTypeSubscription ( vimState ) { if ( vimState . typeSubscription ) { vimState . typeSubscription . dispose ( ) ; } }