This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/royale-docs.git
The following commit(s) were added to refs/heads/master by this push:
new a1ebc43 it's actually -allow-strict-function-types
a1ebc43 is described below
commit a1ebc43c8f4001671522069bb0a1cd7a545e0f8d
Author: Josh Tynjala <[email protected]>
AuthorDate: Thu Jan 8 15:12:43 2026 -0800
it's actually -allow-strict-function-types
---
compiler/compiler-options.md | 34 +++++++++++++++++-----------------
features/as3/strict-function-types.md | 6 +++---
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/compiler/compiler-options.md b/compiler/compiler-options.md
index 8ad648d..f65b0e2 100644
--- a/compiler/compiler-options.md
+++ b/compiler/compiler-options.md
@@ -40,6 +40,7 @@ The [**mxmlc** and **compc**
compilers](compiler/command-line-compiler-usage) bu
-
[`-compiler.allow-private-constructors`](compiler/compiler-options#allow-private-constructors)
-- If true, constructors can be declared private. Useful for a class with
all-static methods or Singletons.
- `-compiler.allow-private-name-conflicts`
- `-compiler.allow-source-path-overlap` -- Checks if a source-path entry is a
subdirectory of another source-path entry. It helps make the package names of
MXML components unambiguous.
+-
[`-compiler.allow-strict-function-types`](compiler/compiler-options#allow-strict-function-types)
-- If true, strict function type expressions may be used.
- `-compiler.allow-subclass-overrides`
- `-compiler.as3` -- With the SWF target, use the ActionScript 3 class based
object model for greater performance and better error reporting. In the class
based object model most built-in functions are implemented as fixed methods of
classes.
- `-compiler.binding-event-handler-class` `<string>`
@@ -113,7 +114,6 @@ The [**mxmlc** and **compc**
compilers](compiler/command-line-compiler-usage) bu
- `-compiler.states-style-override-class` `<string>`
- `-compiler.strict` -- Runs the AS3 compiler in strict error checking mode.
-
[`-compiler.strict-identifier-names`](compiler/compiler-options#strict-identifier-names)
-- Toggles whether identifier names may be keywords or not.
--
[`-compiler.strict-function-types`](compiler/compiler-options#strict-function-types)
-- Toggles whether function type experssions are enabled or not.
- `-compiler.strict-xml` -- Enables stricter rules for XML and E4X.
- `-compiler.swf-external-library-path` `[path-element]` `[...]` -- Overrides
`-external-library-path` for the SWF target.
- `-compiler.swf-library-path` `[path-element]` `[...]` -- Overrides
`-library-path` for JavaScript targets.
@@ -325,6 +325,22 @@ Determines if the `private` namespace may be used with
class constructors. For m
<additionalCompilerOptions>-allow-private-constructors=true;</additionalCompilerOptions>
```
+### allow-strict-function-types {#allow-strict-function-types}
+
+_Available since Royale 0.9.13_
+
+If true, strict function type expressions may be used in ActionScript code.
Allows compile-time signature checking of variables that store `Function`
objects. Includes parameter types and return types. Defaults to `true`.
+
+```sh
+-allow-strict-function-types
+```
+
+#### Maven configuration:
+
+```xml
+<additionalCompilerOptions>-allow-strict-function-types=true;</additionalCompilerOptions>
+```
+
### closure-lib {#closure-lib}
Sets the path to a custom distribution of Google's Closure library, instead of
the default version used by the compiler.
@@ -1190,22 +1206,6 @@ Determines if names of identifiers must follow the
strict rules of ActionScript
<additionalCompilerOptions>-strict-identifier-names=true;</additionalCompilerOptions>
```
-### strict-function-types {#strict-function-types}
-
-_Available since Royale 0.9.13_
-
-Determines if strict function type expressions are enabled or not. Allows
compile-time signature checking of variables that store `Function` objects.
Includes parameter types and return types. Defaults to `true`.
-
-```sh
--strict-function-types
-```
-
-#### Maven configuration:
-
-```xml
-<additionalCompilerOptions>-strict-function-types=true;</additionalCompilerOptions>
-```
-
### source-map {#source-map}
Emits a source map in the debug build for each ActionScript file. The default
value is false.
diff --git a/features/as3/strict-function-types.md
b/features/as3/strict-function-types.md
index f2af6ca..6d2722a 100644
--- a/features/as3/strict-function-types.md
+++ b/features/as3/strict-function-types.md
@@ -23,7 +23,7 @@ permalink: /features/as3/strict-function-types
# Strict function types in ActionScript
--strict-function-types
+-allow-strict-function-types
[Apache Royale](https://royale.apache.org/){:target='\_blank'} adds support
for strict function types in [ActionScript](features/as3). Sometimes also
called _function type expressions_, strict function types allow developers to
require a function to have a compatible signature before it can be assigned to
a variable, passed as a function parameter, or returned from a method. Strict
function types are completely optional, and ActionScript still supports the
`Function` type that accepts an [...]
@@ -31,10 +31,10 @@ _Requires Apache Royale 0.9.13 or newer._
## Compiler option
-Royale enables strict function types by default. To disable strict function
types in your application, use the `-strict-function-types` compiler option.
+Royale enables strict function types by default. To disable strict function
types in your application, use the `-allow-strict-function-types` compiler
option.
```sh
-mxmlc -strict-function-types=false MyApp.mxml
+mxmlc -allow-strict-function-types=false MyApp.mxml
```
## Code examples