You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are three Luau type inference modes that can be set on the first line of a `Class.Script`:
19
19
20
-
-`--!nocheck`- Default mode for all scripts; don't check types
21
-
-`--!nonstrict`- Only asserts variable types if they are explicitly annotated
22
-
-`--!strict`- Asserts all types based off the inferred or explicitly annotated type
20
+
-`--!nocheck`— Don't check types.
21
+
-`--!nonstrict`— Only asserts variable types if they are explicitly annotated.
22
+
-`--!strict`— Asserts all types based off the inferred or explicitly annotated type.
23
23
24
-
The default mode for the type checker is `--!nocheck`. The other two modes control how strict the type checker is with inferring and checking types for variables and functions. Any type mismatches in scripts are highlighted in the [Script Editor](../studio/script-editor.md) and surfaced as warnings in the [Script Analysis](../studio/script-editor.md#script-analysis) window.
24
+
The `--!nonstrict` and `--!strict` modes control how strict the type checker is with inferring and checking types for variables and functions. Any type mismatches in scripts are highlighted in the [Script Editor](../studio/script-editor.md) and surfaced as warnings in the [Script Analysis](../studio/script-editor.md#script-analysis) window.
0 commit comments