Skip to content
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 shorthand ambient module declarations #8945

Merged
10 commits merged into from
Jun 10, 2016
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jun 2, 2016

Half of #6615

@@ -53,7 +53,8 @@ namespace ts {
return state;
}
else if (node.kind === SyntaxKind.ModuleDeclaration) {
return getModuleInstanceState((<ModuleDeclaration>node).body);
const body = (<ModuleDeclaration>node).body;
return body ? getModuleInstanceState(body) : ModuleInstanceState.NonInstantiated;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should always be instantiated if there is no body present.

@ghost ghost force-pushed the shorthand_ambient_module branch from e6a306c to 7e9cb46 Compare June 2, 2016 19:55
@mhegazy
Copy link
Contributor

mhegazy commented Jun 8, 2016

please add a test for:

  • import m = require("mod")
  • export * from "mod", where "mod" is shorthand module, then importing from the reexport
  • export { prop } from "mod", where "mod" is shorthand module, then importing from the reexport

@mhegazy
Copy link
Contributor

mhegazy commented Jun 8, 2016

also a test for goto def in the language service. and find all refs.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 8, 2016

other than that looks good. thanks!

@ghost
Copy link
Author

ghost commented Jun 10, 2016

@mhegazy I assume #9077 isn't blocking this?

@mhegazy
Copy link
Contributor

mhegazy commented Jun 10, 2016

I assume #9077 isn't blocking this?

do not think so.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 10, 2016

👍

@ghost ghost merged commit 71b7d44 into master Jun 10, 2016
@ghost ghost deleted the shorthand_ambient_module branch June 10, 2016 17:10
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants