-
Notifications
You must be signed in to change notification settings - Fork 663
Comment in and fix reportNonDefaultExport #676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+342
−294
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
testdata/baselines/reference/submodule/compiler/allowSyntheticDefaultImports3.errors.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
a.ts(1,8): error TS1192: Module '"b"' has no default export. | ||
|
||
|
||
==== a.ts (1 errors) ==== | ||
import Namespace from "./b"; | ||
~~~~~~~~~ | ||
!!! error TS1192: Module '"b"' has no default export. | ||
export var x = new Namespace.Foo(); | ||
|
||
==== b.ts (0 errors) ==== | ||
export class Foo { | ||
member: string; | ||
} | ||
|
19 changes: 0 additions & 19 deletions
19
...data/baselines/reference/submodule/compiler/allowSyntheticDefaultImports3.errors.txt.diff
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
...erence/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision4.errors.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
service.ts(1,8): error TS2613: Module '"db"' has no default export. Did you mean to use 'import { db } from "db"' instead? | ||
|
||
|
||
==== db.ts (0 errors) ==== | ||
export class db { | ||
public doSomething() { | ||
} | ||
} | ||
|
||
==== service.ts (1 errors) ==== | ||
import db from './db'; // error no default export | ||
~~ | ||
!!! error TS2613: Module '"db"' has no default export. Did you mean to use 'import { db } from "db"' instead? | ||
function someDecorator(target) { | ||
return target; | ||
} | ||
@someDecorator | ||
class MyClass { | ||
db: db.db; | ||
|
||
constructor(db: db.db) { | ||
this.db = db; | ||
this.db.doSomething(); | ||
} | ||
} | ||
export {MyClass}; | ||
|
32 changes: 0 additions & 32 deletions
32
...e/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision4.errors.txt.diff
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...reference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts.errors.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
client.ts(1,8): error TS1192: Module '"server"' has no default export. | ||
client.ts(2,8): error TS1192: Module '"server"' has no default export. | ||
client.ts(4,8): error TS1192: Module '"server"' has no default export. | ||
client.ts(6,8): error TS1192: Module '"server"' has no default export. | ||
client.ts(9,8): error TS1192: Module '"server"' has no default export. | ||
client.ts(11,8): error TS1192: Module '"server"' has no default export. | ||
|
||
|
||
==== server.ts (0 errors) ==== | ||
export class a { } | ||
export class x { } | ||
export class m { } | ||
export class a11 { } | ||
export class a12 { } | ||
export class x11 { } | ||
|
||
==== client.ts (6 errors) ==== | ||
import defaultBinding1, { } from "./server"; | ||
~~~~~~~~~~~~~~~ | ||
!!! error TS1192: Module '"server"' has no default export. | ||
import defaultBinding2, { a } from "./server"; | ||
~~~~~~~~~~~~~~~ | ||
!!! error TS1192: Module '"server"' has no default export. | ||
export var x1 = new a(); | ||
import defaultBinding3, { a11 as b } from "./server"; | ||
~~~~~~~~~~~~~~~ | ||
!!! error TS1192: Module '"server"' has no default export. | ||
export var x2 = new b(); | ||
import defaultBinding4, { x, a12 as y } from "./server"; | ||
~~~~~~~~~~~~~~~ | ||
!!! error TS1192: Module '"server"' has no default export. | ||
export var x4 = new x(); | ||
export var x5 = new y(); | ||
import defaultBinding5, { x11 as z, } from "./server"; | ||
~~~~~~~~~~~~~~~ | ||
!!! error TS1192: Module '"server"' has no default export. | ||
export var x3 = new z(); | ||
import defaultBinding6, { m, } from "./server"; | ||
~~~~~~~~~~~~~~~ | ||
!!! error TS1192: Module '"server"' has no default export. | ||
export var x6 = new m(); | ||
|
47 changes: 0 additions & 47 deletions
47
...ence/submodule/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts.errors.txt.diff
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
...ference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5.errors.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(1,8): error TS1192: Module '"es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. | ||
es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(2,8): error TS1192: Module '"es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. | ||
es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(4,8): error TS1192: Module '"es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. | ||
es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(6,8): error TS1192: Module '"es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. | ||
es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(9,8): error TS1192: Module '"es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. | ||
es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts(11,8): error TS1192: Module '"es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. | ||
|
||
|
||
==== es6ImportDefaultBindingFollowedWithNamedImportInEs5_0.ts (0 errors) ==== | ||
export var a = 10; | ||
export var x = a; | ||
export var m = a; | ||
|
||
==== es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.ts (6 errors) ==== | ||
import defaultBinding1, { } from "./es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"; | ||
~~~~~~~~~~~~~~~ | ||
!!! error TS1192: Module '"es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. | ||
import defaultBinding2, { a } from "./es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"; | ||
~~~~~~~~~~~~~~~ | ||
!!! error TS1192: Module '"es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. | ||
var x1: number = a; | ||
import defaultBinding3, { a as b } from "./es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"; | ||
~~~~~~~~~~~~~~~ | ||
!!! error TS1192: Module '"es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. | ||
var x1: number = b; | ||
import defaultBinding4, { x, a as y } from "./es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"; | ||
~~~~~~~~~~~~~~~ | ||
!!! error TS1192: Module '"es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. | ||
var x1: number = x; | ||
var x1: number = y; | ||
import defaultBinding5, { x as z, } from "./es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"; | ||
~~~~~~~~~~~~~~~ | ||
!!! error TS1192: Module '"es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. | ||
var x1: number = z; | ||
import defaultBinding6, { m, } from "./es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"; | ||
~~~~~~~~~~~~~~~ | ||
!!! error TS1192: Module '"es6ImportDefaultBindingFollowedWithNamedImportInEs5_0"' has no default export. | ||
var x1: number = m; | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.