Skip to content

Support shorthand ambient module declarations#8945

Merged
10 commits merged into
masterfrom
shorthand_ambient_module
Jun 10, 2016
Merged

Support shorthand ambient module declarations#8945
10 commits merged into
masterfrom
shorthand_ambient_module

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jun 2, 2016

Half of #6615

Comment thread src/compiler/binder.ts Outdated
else if (node.kind === SyntaxKind.ModuleDeclaration) {
return getModuleInstanceState((<ModuleDeclaration>node).body);
const body = (<ModuleDeclaration>node).body;
return body ? getModuleInstanceState(body) : ModuleInstanceState.NonInstantiated;
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

mhegazy commented Jun 8, 2016

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

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Jun 8, 2016

other than that looks good. thanks!

@ghost
Copy link
Copy Markdown
Author

ghost commented Jun 10, 2016

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

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Jun 10, 2016

I assume #9077 isn't blocking this?

do not think so.

@mhegazy
Copy link
Copy Markdown
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