import * as vscode from 'vscode' ; export interface WizardContext { debugConfigProvider : vscode . DebugConfigurationProvider ; workspace : vscode . WorkspaceFolder ; message : ( msg : string , section ? : string ) => void ; verbose ? : boolean ; } export type WizardStatus = 'success' | 'error' | 'abort' | 'exit' | undefined ; export type WizardAction < T > = ( ) => Promise < T > ; interface ActionableComp < T > { id : number ; action : WizardAction < T > ; } export type ActionableMenuItem < T = WizardStatus > = vscode . QuickPickItem & ActionableComp < T > ; export type ActionableButton < T = WizardStatus > = vscode . QuickInputButton & ActionableComp < T > ; export type ActionableMessageItem < T > = vscode . MessageItem & ActionableComp < T > ; export const isActionableButton = ( arg ) : arg is ActionableButton < unknown > => arg && arg . iconPath && typeof arg . action === 'function' ; export type ActionMessageType = 'info' | 'warning' | 'error' ; export type AllowBackButton = { enableBackButton ? : boolean ; } ; export type Verbose = { verbose ? : boolean ; } ; export type ActionMenuInput < T > = ActionableMenuItem < T > | ActionableButton < T > | undefined ; export type ActionableMenuResult < T = WizardStatus > = T | undefined ; export interface ActionMenuOptions < T = WizardStatus > extends AllowBackButton , Verbose { title ? : string ; placeholder ? : string ; value ? : string ; rightButtons ? : ActionableButton < T > [ ] ; selectItemIdx ? : number ; } export type ActionInputResult < T > = T | string | undefined ; export type ActionInput < T > = ActionInputResult < T > | ActionableButton < T > | undefined ; export interface ActionInputBoxOptions < T > extends AllowBackButton , Verbose { title ? : string ; prompt ? : string ; value ? : string ; rightButtons ? : ActionableButton < T > [ ] ; } export type SetupTask = ( context : WizardContext ) => Promise < WizardStatus > ; export const JestSettings = [ 'pathToJest' , 'pathToConfig' , 'jestCommandLine' , 'rootPath' ] ; type JestSettingKey = typeof JestSettings [ number ] ; export type WizardSettings = { [ key in JestSettingKey ] ? : string ; } & { [ 'configurations' ] ? : vscode . DebugConfiguration [ ] ; } & { [ 'absoluteRootPath' ] ? : string ; } ; export interface ConfigEntry { name : string ; value : unknown ; } export const WIZARD_HELP_URL = 'https://github.com/jest-community/vscode-jest/blob/master/setup-wizard.md' ;