Skip to content

Commit 97ed070

Browse files
update Open Source Docs from Roblox internal teams
1 parent a0635dc commit 97ed070

File tree

237 files changed

+3318
-2571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+3318
-2571
lines changed

content/en-us/luau/comments.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,29 @@ If necessary, you can nest multiple brackets inside a block comment using the sa
4747
]=]
4848
```
4949

50+
## Comment directives
51+
52+
Luau uses comments that start with `!` to control features like [type checking](type-checking.md), [native code generation](native-code-gen.md), and [linting](https://luau.org/lint).
53+
54+
```lua
55+
--!strict
56+
--!nonstrict
57+
--!nocheck
58+
--!native
59+
--!nolint
60+
--!optimize 0|1|2
61+
```
62+
63+
For linting, Roblox Studio enables the following subset of warning codes from the [Luau linter](https://luau.org/lint): 1, 2, 3, 6, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28.
64+
65+
The `--!optimize` directive controls the optimization level of the Luau compiler for the script:
66+
67+
- 0 disables optimizations.
68+
- 1 enables basic optimizations (default in Studio testing).
69+
- 2 enables further optimizations (default in live games).
70+
71+
Exact optimizations aren't published and are subject to change. We recommend using the default values unless you have a specific reason not to.
72+
5073
## To-do comments
5174

5275
Roblox Studio supports special `TODO` comments. Studio bolds any text following `TODO` (until broken by a space):

content/en-us/reference/engine/classes/AccessoryDescription.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ methods:
230230
deprecation_message: ''
231231
security: None
232232
thread_safety: Unsafe
233-
capabilities: []
233+
capabilities:
234+
- Avatar
234235
writeCapabilities: []
235236
events: []
236237
callbacks: []

content/en-us/reference/engine/classes/Actor.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ methods:
4747
parameters:
4848
- name: topic
4949
type: string
50-
default:
50+
default: ''
5151
summary: |
5252
The topic used to identify the type of message.
5353
- name: function
5454
type: Function
55-
default:
55+
default: ''
5656
summary: ''
5757
returns:
5858
- type: RBXScriptConnection
@@ -93,12 +93,12 @@ methods:
9393
parameters:
9494
- name: topic
9595
type: string
96-
default:
96+
default: ''
9797
summary: |
9898
The topic used to identify the type of message.
9999
- name: function
100100
type: Function
101-
default:
101+
default: ''
102102
summary: ''
103103
returns:
104104
- type: RBXScriptConnection
@@ -133,12 +133,12 @@ methods:
133133
parameters:
134134
- name: topic
135135
type: string
136-
default:
136+
default: ''
137137
summary: |
138138
The topic used to identify the message being sent.
139139
- name: message
140140
type: Tuple
141-
default:
141+
default: ''
142142
summary: |
143143
The contents of the message to send to the Actor.
144144
returns:

content/en-us/reference/engine/classes/AdGui.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ callbacks:
9898
parameters:
9999
- name: eventInfo
100100
type: Dictionary
101-
default:
101+
default: ''
102102
summary: |
103103
Options table for the method:
104104
@@ -113,5 +113,6 @@ callbacks:
113113
deprecation_message: ''
114114
security: None
115115
thread_safety: Unsafe
116-
capabilities: []
116+
capabilities:
117+
- UI
117118
writeCapabilities: []

content/en-us/reference/engine/classes/AdService.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ methods:
2626
parameters:
2727
- name: devProductId
2828
type: int64
29-
default:
29+
default: ''
3030
summary: ''
3131
returns:
3232
- type: AdReward
@@ -64,7 +64,7 @@ methods:
6464
parameters:
6565
- name: adFormat
6666
type: AdFormat
67-
default:
67+
default: ''
6868
summary: ''
6969
returns:
7070
- type: Variant
@@ -83,11 +83,11 @@ methods:
8383
parameters:
8484
- name: player
8585
type: Player
86-
default:
86+
default: ''
8787
summary: ''
8888
- name: reward
8989
type: AdReward
90-
default:
90+
default: ''
9191
summary: ''
9292
returns:
9393
- type: ShowAdResult
@@ -109,7 +109,7 @@ events:
109109
parameters:
110110
- name: adShown
111111
type: boolean
112-
default:
112+
default: ''
113113
summary: ''
114114
tags:
115115
- Deprecated

0 commit comments

Comments
 (0)