Req. IDE-163: External allowed occurrences (ver. 1)
-
Declarations with external flags are only allowed in files with the extension (so called N4JS definition files).
-
Only external classes, external interfaces marked with
@N4JS
, external enums, external function declarations and structurally typed interfaces are allowed in a file. -
Declarations with external flags are allowed to subclass built-in type
Error
type and all of its descendants such asEvalError
,RangeError
,ReferenceError
,SyntaxError
,TypeError
andURIError
, although any of the error types are annotated with@N4JS
.
The following explanations apply to all external declarations except where stated otherwise.
In general, an external declaration uses the same syntax as the declaration of a normal N4JS declaration with the addition of the modifier external
.
External classifiers are always ’entirely external’ in that it is not possible to combine defined methods and external methods within a single class or interface.