TypeScript Version: 2.2.1
Code
import methodFactory from './http-client'
export { httpDelete as delete } // block scoped httpDelete used before declaration
const httpDelete = methodFactory('DELETE')
Expected behavior:
No error. The export declaration makes no use of the variable; what should happen is that httpDelete's TDZ should extend to the delete export, but that happens regardless of the relative position of the export declaration.
Actual behavior:
Two errors in the same line about the variable being used before assignment.
This error is correct in the case of export default and the typescript-specific export =, but not in any other use of export.
TypeScript Version: 2.2.1
Code
Expected behavior:
No error. The export declaration makes no use of the variable; what should happen is that
httpDelete's TDZ should extend to thedeleteexport, but that happens regardless of the relative position of theexportdeclaration.Actual behavior:
Two errors in the same line about the variable being used before assignment.
This error is correct in the case of
export defaultand the typescript-specificexport =, but not in any other use ofexport.