export type PartialConfigOptions = { allowJs : boolean ; jsx : boolean ; includeJson ? : boolean ; includeDefinitions ? : boolean ; } ; export function getScriptFileExtensions ( options ) { const extensions = [ '.ts' ] ; if ( options . allowJs ) { extensions . push ( '.js' ) ; if ( options . jsx ) { extensions . push ( '.jsx' ) ; } } if ( options . includeJson ) { extensions . push ( '.json' ) ; } if ( options . jsx ) { extensions . push ( '.tsx' ) ; } if ( options . includeDefinitions ) { extensions . push ( '.d.ts' ) ; if ( options . jsx ) { extensions . push ( '.d.jsx' ) ; } } return extensions ; }