This repository was archived by the owner on Aug 4, 2021. It is now read-only.
Description When importing more than one class from separate files the __extends helper is needlessly duplicated. Bundling main.ts below
// main.ts
export { A } from './A' ;
export { B } from './B' ;
// Base.ts
export default class Base { }
// A.ts
import Base from './Base' ;
export class A extends Base { }
// B.ts
import Base from './Base' ;
export class B extends Base { }
yields
var Base = ( function ( ) {
function Base ( ) {
}
return Base ;
} ) ( ) ;
var __extends = ( this && this . __extends ) || function ( d , b ) {
for ( var p in b ) if ( b . hasOwnProperty ( p ) ) d [ p ] = b [ p ] ;
function __ ( ) { this . constructor = d ; }
d . prototype = b === null ? Object . create ( b ) : ( __ . prototype = b . prototype , new __ ( ) ) ;
} ;
var A = ( function ( _super ) {
__extends ( A , _super ) ;
function A ( ) {
_super . apply ( this , arguments ) ;
}
return A ;
} ) ( Base ) ;
var __extends$1 = ( this && this . __extends ) || function ( d , b ) {
for ( var p in b ) if ( b . hasOwnProperty ( p ) ) d [ p ] = b [ p ] ;
function __ ( ) { this . constructor = d ; }
d . prototype = b === null ? Object . create ( b ) : ( __ . prototype = b . prototype , new __ ( ) ) ;
} ;
var B = ( function ( _super ) {
__extends$1 ( B , _super ) ;
function B ( ) {
_super . apply ( this , arguments ) ;
}
return B ;
} ) ( Base ) ;
export { A , B } ;
We should not include duplicate helpers.
Reactions are currently unavailable
When importing more than one class from separate files the
__extendshelper is needlessly duplicated. Bundlingmain.tsbelowyields
We should not include duplicate helpers.