-
Notifications
You must be signed in to change notification settings - Fork 784
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
Merged
Changes from 2 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
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.
41 changes: 13 additions & 28 deletions
41
...e/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision4.errors.txt.diff
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 |
|---|---|---|
| @@ -1,32 +1,17 @@ | ||
| --- old.decoratorMetadataWithImportDeclarationNameCollision4.errors.txt | ||
| +++ new.decoratorMetadataWithImportDeclarationNameCollision4.errors.txt | ||
| @@= skipped -0, +-1 lines =@@ | ||
| @@= skipped -0, +0 lines =@@ | ||
| -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 | ||
| - ~~ | ||
| +service.ts(1,8): error TS1192: Module '"db"' has no default export. | ||
|
|
||
|
|
||
| ==== db.ts (0 errors) ==== | ||
| @@= skipped -9, +9 lines =@@ | ||
| ==== 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}; | ||
| - | ||
| @@= skipped --1, +1 lines =@@ | ||
| +<no content> | ||
| +!!! error TS1192: Module '"db"' has no default export. | ||
| function someDecorator(target) { | ||
| return target; | ||
| } |
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
47 changes: 0 additions & 47 deletions
47
...ence/submodule/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts.errors.txt.diff
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
...ce/submodule/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5.errors.txt.diff
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
...submodule/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.errors.txt.diff
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
...bmodule/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.errors.txt.diff
This file was deleted.
Oops, something went wrong.
5 changes: 4 additions & 1 deletion
5
...bmodule/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.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 |
|---|---|---|
| @@ -1,11 +1,14 @@ | ||
| client.ts(1,1): error TS1191: An import declaration cannot have modifiers. | ||
| client.ts(1,15): error TS1192: Module '"server"' has no default export. | ||
|
|
||
|
|
||
| ==== server.ts (0 errors) ==== | ||
| export var a = 10; | ||
|
|
||
| ==== client.ts (1 errors) ==== | ||
| ==== client.ts (2 errors) ==== | ||
| export import defaultBinding, * as nameSpaceBinding from "./server"; | ||
| ~~~~~~ | ||
| !!! error TS1191: An import declaration cannot have modifiers. | ||
| ~~~~~~~~~~~~~~ | ||
| !!! error TS1192: Module '"server"' has no default export. | ||
| export var x: number = nameSpaceBinding.a; |
18 changes: 0 additions & 18 deletions
18
...le/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.errors.txt.diff
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.