36 lines
805 B
Plaintext
36 lines
805 B
Plaintext
== Why is this an issue?
|
|
|
|
Each file is considered an "external" module. The use of the ``++module++`` keyword creates an internal module, and was used before the ECMAScript 2015 addition of ``++namespace++``s for the same purpose. Now that ``++namespace++`` is available, the use of ``++module++`` is deprecated because it does the same thing, and its use could confuse maintainers unaware of the history of the language.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,javascript]
|
|
----
|
|
module myMod { // Noncompliant
|
|
// ...
|
|
}
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,javascript]
|
|
----
|
|
namespace myMod {
|
|
// ...
|
|
}
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
include::highlighting.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|