-
-
Notifications
You must be signed in to change notification settings - Fork 671
Support export *
#249
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
Support export *
#249
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ under the licensing terms detailed in LICENSE: | |
* Igor Sbitnev <[email protected]> | ||
* Norton Wang <[email protected]> | ||
* Alan Pierce <[email protected]> | ||
* Andy Hanson <[email protected]> | ||
|
||
Portions of this software are derived from third-party works licensed under | ||
the following terms: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,7 @@ | |
"A parameter property cannot be declared using a rest parameter.": 1317, | ||
|
||
"Duplicate identifier '{0}'.": 2300, | ||
"Identifier '{0}' is re-exported from modules '{1}' and '{2}'.": 2301, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The convention for new errors that do not exist in TS I used so far is to use a 3-digit code instead (TS has 4 digit codes only), in this case that'd be the next For reference, the original TS error here is "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor.": {
"category": "Error",
"code": 2301
}, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like TS already has a diagnostic for this situation, so I'll use that instead of creating an AS-specific one. |
||
"Cannot find name '{0}'.": 2304, | ||
"Module '{0}' has no exported member '{1}'.": 2305, | ||
"Generic type '{0}' requires {1} type argument(s).": 2314, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before, this worked as follows: On
import "some/file"
, the compiler first requestedsome/file.ts
from the frontend (here: asc), and if that didn't exist,some/file/index.ts
. Both had a distinct internal name (eithersome/file
orsome/file/index
), and their declarations were not mixed in any way. From a source file, one could both importsome/file
andsome/file/index
, if both would happen to exist. This matches what node.js is doing, and I wonder why a change like stripping/index
is necessary, effectively removing that functionality?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated this branch so we can support
foo.ts
andfoo/index.ts
simultaneously.There actually was a bug due to being too permissive and trying to resolve imports from both
foo.ts
andfoo/index.ts
:foo.ts
:export const foo1 = 0;
foo/index.ts
:export const foo2 = 0;
user.ts:
Shouldn't compile, but did. Fixed in this branch. (Would be nice if we could have negative tests to verify that this isn't allowed, is there an issue open for that?)