File tree Expand file tree Collapse file tree 5 files changed +14
-9
lines changed Expand file tree Collapse file tree 5 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,12 @@ export class DtsEmitHelpers {
16
16
public static emitImport ( stringWriter : StringWriter , collectorEntity : CollectorEntity , astImport : AstImport ) : void {
17
17
switch ( astImport . importKind ) {
18
18
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 } ';` ) ;
20
25
break ;
21
26
case AstImportKind . NamedImport :
22
27
if ( collectorEntity . nameForEmit !== astImport . exportName ) {
Original file line number Diff line number Diff line change 12
12
/// <reference types="jest" />
13
13
/// <reference lib="es2015.symbol.wellknown" />
14
14
/// <reference lib="es2018.intl" />
15
- import Long from 'long' ;
15
+ import { default as Long_2 } from 'long' ;
16
16
import { MAX_UNSIGNED_VALUE } from 'long' ;
17
17
18
18
/**
@@ -309,7 +309,7 @@ declare const unexportedCustomSymbol: unique symbol;
309
309
310
310
/** @public */
311
311
export declare class UseLong {
312
- use_long ( ) : Long ;
312
+ use_long ( ) : Long_2 ;
313
313
}
314
314
315
315
/* Excluded from this release type: VARIABLE */
Original file line number Diff line number Diff line change 12
12
/// <reference types="jest" />
13
13
/// <reference lib="es2015.symbol.wellknown" />
14
14
/// <reference lib="es2018.intl" />
15
- import Long from 'long' ;
15
+ import { default as Long_2 } from 'long' ;
16
16
import { MAX_UNSIGNED_VALUE } from 'long' ;
17
17
18
18
/**
@@ -302,7 +302,7 @@ declare const unexportedCustomSymbol: unique symbol;
302
302
303
303
/** @public */
304
304
export declare class UseLong {
305
- use_long ( ) : Long ;
305
+ use_long ( ) : Long_2 ;
306
306
}
307
307
308
308
/* Excluded from this release type: VARIABLE */
Original file line number Diff line number Diff line change 12
12
/// <reference types="jest" />
13
13
/// <reference lib="es2015.symbol.wellknown" />
14
14
/// <reference lib="es2018.intl" />
15
- import Long from 'long' ;
15
+ import { default as Long_2 } from 'long' ;
16
16
import { MAX_UNSIGNED_VALUE } from 'long' ;
17
17
18
18
/**
@@ -330,7 +330,7 @@ declare const unexportedCustomSymbol: unique symbol;
330
330
331
331
/** @public */
332
332
export declare class UseLong {
333
- use_long ( ) : Long ;
333
+ use_long ( ) : Long_2 ;
334
334
}
335
335
336
336
/** @alpha */
Original file line number Diff line number Diff line change 4
4
5
5
``` ts
6
6
7
- import Long from ' long' ;
7
+ import { default as Long_2 } from ' long' ;
8
8
import { MAX_UNSIGNED_VALUE } from ' long' ;
9
9
10
10
// @public
@@ -190,7 +190,7 @@ export class TypeReferencesInAedoc {
190
190
// @public (undocumented)
191
191
export class UseLong {
192
192
// (undocumented)
193
- use_long(): Long ;
193
+ use_long(): Long_2 ;
194
194
}
195
195
196
196
// @alpha (undocumented)
You can’t perform that action at this time.
0 commit comments