@@ -12,6 +12,13 @@ type DefaultSpokenFormMapDefinition = {
12
12
> ;
13
13
} ;
14
14
15
+ /**
16
+ * This map contains the default spoken forms for all our speakable entities,
17
+ * including scope types, paired delimiters, etc. We would like this map to
18
+ * become the sole source of truth for our default spoken forms, including the
19
+ * Talon side. Today it is only used on the extension side for testing, and as a
20
+ * fallback when we can't get the custom spoken forms from Talon.
21
+ */
15
22
const defaultSpokenFormMapCore : DefaultSpokenFormMapDefinition = {
16
23
pairedDelimiter : {
17
24
curlyBrackets : "curly" ,
@@ -130,7 +137,15 @@ const defaultSpokenFormMapCore: DefaultSpokenFormMapDefinition = {
130
137
customRegex : { } ,
131
138
} ;
132
139
133
- function disabledByDefault (
140
+ /**
141
+ * Used to construct entities that should not be speakable by default.
142
+ *
143
+ * @param spokenForms The default spoken forms for this entity
144
+ * @returns A DefaultSpokenFormMapEntry with the given spoken forms, and
145
+ * {@link DefaultSpokenFormMapEntry.isDisabledByDefault|isDisabledByDefault} set
146
+ * to true
147
+ */
148
+ function isDisabledByDefault (
134
149
...spokenForms : string [ ]
135
150
) : DefaultSpokenFormMapEntry {
136
151
return {
@@ -140,7 +155,15 @@ function disabledByDefault(
140
155
} ;
141
156
}
142
157
143
- function secret ( ...spokenForms : string [ ] ) : DefaultSpokenFormMapEntry {
158
+ /**
159
+ * Used to construct entities that are only for internal experimentation.
160
+ *
161
+ * @param spokenForms The default spoken forms for this entity
162
+ * @returns A DefaultSpokenFormMapEntry with the given spoken forms, and
163
+ * {@link DefaultSpokenFormMapEntry.isDisabledByDefault|isDisabledByDefault} and
164
+ * {@link DefaultSpokenFormMapEntry.isPrivate|isPrivate} set to true
165
+ */
166
+ function isPrivate ( ...spokenForms : string [ ] ) : DefaultSpokenFormMapEntry {
144
167
return {
145
168
defaultSpokenForms : spokenForms ,
146
169
isDisabledByDefault : true ,
@@ -150,8 +173,19 @@ function secret(...spokenForms: string[]): DefaultSpokenFormMapEntry {
150
173
151
174
export interface DefaultSpokenFormMapEntry {
152
175
defaultSpokenForms : string [ ] ;
176
+
177
+ /**
178
+ * If `true`, indicates that the entry may have a default spoken form, but
179
+ * it should not be enabled by default. These will show up in user csv's with
180
+ * a `-` at the beginning.
181
+ */
153
182
isDisabledByDefault : boolean ;
154
- isSecret : boolean ;
183
+
184
+ /**
185
+ * If `true`, indicates that the entry is only for internal experimentation,
186
+ * and should not be exposed to users except within a targeted working group.
187
+ */
188
+ isPrivate : boolean ;
155
189
}
156
190
157
191
export type DefaultSpokenFormMap = {
0 commit comments