import * as vscode from 'vscode' ; export function getConfiguredProperty < T > ( documentOrEditor , property , fallback ) { const document = isEditor ( documentOrEditor ) ? documentOrEditor . document : documentOrEditor ; const config = vscode . workspace . getConfiguration ( 'gutterpreview' , document ? document . uri : undefined ) ; return config . get ( property . toLowerCase ( ) , config . get ( property , fallback ) ) ; } function isEditor ( documentOrEditor ) { return ( documentOrEditor as any ) . document != null ; }