Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardTypeScriptverbatimModuleSyntax isolatedModulesSingle-choice MCQ

Under `isolatedModules`, why does the compiler reject re-exporting a type that was imported with a value-style import, e.g. `export { SomeType } from './types'` when `SomeType` is only a type?

// file: barrel.ts // './types' exports `interface SomeType {}` (no value) export { SomeType } from './types';