import ts from 'typescript' ; import semver from 'semver' ; const originalFactory = ts . factory ; function createImportSpecifier ( propertyName , name ) { if ( semver . satisfies ( ts . version , '>= 4.5' ) ) return originalFactory . createImportSpecifier ( false , propertyName , name ) ; return originalFactory . createImportSpecifier ( propertyName , name ) ; } function createExportSpecifier ( propertyName , name ) { if ( semver . satisfies ( ts . version , '>= 4.5' ) ) return originalFactory . createExportSpecifier ( false , propertyName , name ) ; return originalFactory . createExportSpecifier ( propertyName , name ) ; } export const factory = { ... originalFactory , createImportSpecifier , createExportSpecifier , } ;