File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,12 @@ export class DtsEmitHelpers {
1616 public static emitImport ( stringWriter : StringWriter , collectorEntity : CollectorEntity , astImport : AstImport ) : void {
1717 switch ( astImport . importKind ) {
1818 case AstImportKind . DefaultImport :
19- stringWriter . writeLine ( `import ${ astImport . exportName } from '${ astImport . modulePath } ';` ) ;
19+ if ( collectorEntity . nameForEmit !== astImport . exportName ) {
20+ stringWriter . write ( `import { default as ${ collectorEntity . nameForEmit } }` ) ;
21+ } else {
22+ stringWriter . write ( `import ${ astImport . exportName } ` ) ;
23+ }
24+ stringWriter . writeLine ( ` from '${ astImport . modulePath } ';` ) ;
2025 break ;
2126 case AstImportKind . NamedImport :
2227 if ( collectorEntity . nameForEmit !== astImport . exportName ) {
Original file line number Diff line number Diff line change 1212/// <reference types="jest" />
1313/// <reference lib="es2015.symbol.wellknown" />
1414/// <reference lib="es2018.intl" />
15- import Long from 'long' ;
15+ import { default as Long_2 } from 'long' ;
1616import { MAX_UNSIGNED_VALUE } from 'long' ;
1717
1818/**
@@ -309,7 +309,7 @@ declare const unexportedCustomSymbol: unique symbol;
309309
310310/** @public */
311311export declare class UseLong {
312- use_long ( ) : Long ;
312+ use_long ( ) : Long_2 ;
313313}
314314
315315/* Excluded from this release type: VARIABLE */
Original file line number Diff line number Diff line change 1212/// <reference types="jest" />
1313/// <reference lib="es2015.symbol.wellknown" />
1414/// <reference lib="es2018.intl" />
15- import Long from 'long' ;
15+ import { default as Long_2 } from 'long' ;
1616import { MAX_UNSIGNED_VALUE } from 'long' ;
1717
1818/**
@@ -302,7 +302,7 @@ declare const unexportedCustomSymbol: unique symbol;
302302
303303/** @public */
304304export declare class UseLong {
305- use_long ( ) : Long ;
305+ use_long ( ) : Long_2 ;
306306}
307307
308308/* Excluded from this release type: VARIABLE */
Original file line number Diff line number Diff line change 1212/// <reference types="jest" />
1313/// <reference lib="es2015.symbol.wellknown" />
1414/// <reference lib="es2018.intl" />
15- import Long from 'long' ;
15+ import { default as Long_2 } from 'long' ;
1616import { MAX_UNSIGNED_VALUE } from 'long' ;
1717
1818/**
@@ -330,7 +330,7 @@ declare const unexportedCustomSymbol: unique symbol;
330330
331331/** @public */
332332export declare class UseLong {
333- use_long ( ) : Long ;
333+ use_long ( ) : Long_2 ;
334334}
335335
336336/** @alpha */
Original file line number Diff line number Diff line change 44
55``` ts
66
7- import Long from ' long' ;
7+ import { default as Long_2 } from ' long' ;
88import { MAX_UNSIGNED_VALUE } from ' long' ;
99
1010// @public
@@ -190,7 +190,7 @@ export class TypeReferencesInAedoc {
190190// @public (undocumented)
191191export class UseLong {
192192 // (undocumented)
193- use_long(): Long ;
193+ use_long(): Long_2 ;
194194}
195195
196196// @alpha (undocumented)
You can’t perform that action at this time.
0 commit comments