@@ -12,6 +12,13 @@ type DefaultSpokenFormMapDefinition = {
1212 > ;
1313} ;
1414
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+ */
1522const defaultSpokenFormMapCore : DefaultSpokenFormMapDefinition = {
1623 pairedDelimiter : {
1724 curlyBrackets : "curly" ,
@@ -130,7 +137,15 @@ const defaultSpokenFormMapCore: DefaultSpokenFormMapDefinition = {
130137 customRegex : { } ,
131138} ;
132139
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 (
134149 ...spokenForms : string [ ]
135150) : DefaultSpokenFormMapEntry {
136151 return {
@@ -140,7 +155,15 @@ function disabledByDefault(
140155 } ;
141156}
142157
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 {
144167 return {
145168 defaultSpokenForms : spokenForms ,
146169 isDisabledByDefault : true ,
@@ -150,8 +173,19 @@ function secret(...spokenForms: string[]): DefaultSpokenFormMapEntry {
150173
151174export interface DefaultSpokenFormMapEntry {
152175 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+ */
153182 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 ;
155189}
156190
157191export type DefaultSpokenFormMap = {
0 commit comments