@@ -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" ,
@@ -129,6 +136,14 @@ const defaultSpokenFormMapCore: DefaultSpokenFormMapDefinition = {
129
136
customRegex : { } ,
130
137
} ;
131
138
139
+ /**
140
+ * Used to construct entities that should not be speakable by default.
141
+ *
142
+ * @param spokenForms The default spoken forms for this entity
143
+ * @returns A DefaultSpokenFormMapEntry with the given spoken forms, and
144
+ * {@link DefaultSpokenFormMapEntry.isDisabledByDefault|isDisabledByDefault} set
145
+ * to true
146
+ */
132
147
function disabledByDefault (
133
148
...spokenForms : string [ ]
134
149
) : DefaultSpokenFormMapEntry {
@@ -139,6 +154,14 @@ function disabledByDefault(
139
154
} ;
140
155
}
141
156
157
+ /**
158
+ * Used to construct entities that are only for internal experimentation.
159
+ *
160
+ * @param spokenForms The default spoken forms for this entity
161
+ * @returns A DefaultSpokenFormMapEntry with the given spoken forms, and
162
+ * {@link DefaultSpokenFormMapEntry.isDisabledByDefault|isDisabledByDefault} and
163
+ * {@link DefaultSpokenFormMapEntry.isSecret|isSecret} set to true
164
+ */
142
165
function secret ( ...spokenForms : string [ ] ) : DefaultSpokenFormMapEntry {
143
166
return {
144
167
defaultSpokenForms : spokenForms ,
@@ -149,7 +172,18 @@ function secret(...spokenForms: string[]): DefaultSpokenFormMapEntry {
149
172
150
173
export interface DefaultSpokenFormMapEntry {
151
174
defaultSpokenForms : string [ ] ;
175
+
176
+ /**
177
+ * If `true`, indicates that the entry may have a default spoken form, but
178
+ * it should not be enabled by default. These will show up in user csv's with
179
+ * a `-` at the beginning.
180
+ */
152
181
isDisabledByDefault : boolean ;
182
+
183
+ /**
184
+ * If `true`, indicates that the entry is only for internal experimentation,
185
+ * and should not be exposed to users except within a targeted working group.
186
+ */
153
187
isSecret : boolean ;
154
188
}
155
189
0 commit comments