@@ -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,6 +137,14 @@ const defaultSpokenFormMapCore: DefaultSpokenFormMapDefinition = {
130
137
customRegex : { } ,
131
138
} ;
132
139
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
+ */
133
148
function disabledByDefault (
134
149
...spokenForms : string [ ]
135
150
) : DefaultSpokenFormMapEntry {
@@ -140,6 +155,14 @@ function disabledByDefault(
140
155
} ;
141
156
}
142
157
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.isSecret|isSecret} set to true
165
+ */
143
166
function secret ( ...spokenForms : string [ ] ) : DefaultSpokenFormMapEntry {
144
167
return {
145
168
defaultSpokenForms : spokenForms ,
@@ -150,7 +173,18 @@ 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 ;
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
+ */
154
188
isSecret : boolean ;
155
189
}
156
190
0 commit comments