@@ -28,7 +28,7 @@ import * as logger from "../logger";
2828 * an Expression<number> as the value of an option that normally accepts numbers.
2929 */
3030export abstract class Expression < T extends string | number | boolean | string [ ] > {
31- /** Returns the Expression 's runtime value, based on the CLI's resolution of params . */
31+ /** Returns the expression 's runtime value, based on the CLI's resolution of parameters . */
3232 value ( ) : T {
3333 if ( process . env . FUNCTIONS_CONTROL_API === "true" ) {
3434 logger . warn (
@@ -47,11 +47,12 @@ export abstract class Expression<T extends string | number | boolean | string[]>
4747 throw new Error ( "Not implemented" ) ;
4848 }
4949
50- /** Returns the Expression 's representation as a braced CEL expression. */
50+ /** Returns the expression 's representation as a braced CEL expression. */
5151 toCEL ( ) : string {
5252 return `{{ ${ this . toString ( ) } }}` ;
5353 }
5454
55+ /** Returns the expression's representation as JSON. */
5556 toJSON ( ) : string {
5657 return this . toString ( ) ;
5758 }
@@ -61,8 +62,8 @@ function valueOf<T extends string | number | boolean | string[]>(arg: T | Expres
6162 return arg instanceof Expression ? arg . runtimeValue ( ) : arg ;
6263}
6364/**
64- * Returns how an entity (either an Expression or a literal value) should be represented in CEL.
65- * - Expressions delegate to the .toString() method, which is used by the WireManifest
65+ * Returns how an entity (either an ` Expression` or a literal value) should be represented in CEL.
66+ * - Expressions delegate to the ` .toString()` method, which is used by the WireManifest
6667 * - Strings have to be quoted explicitly
6768 * - Arrays are represented as []-delimited, parsable JSON
6869 * - Numbers and booleans are not quoted explicitly
@@ -159,7 +160,7 @@ export class CompareExpression<
159160 return `${ this . lhs } ${ this . cmp } ${ rhsStr } ` ;
160161 }
161162
162- /** Returns a TernaryExpression which can resolve to one of two values, based on the resolution of this comparison. */
163+ /** Returns a ` TernaryExpression` which can resolve to one of two values, based on the resolution of this comparison. */
163164 thenElse < retT extends string | number | boolean | string [ ] > (
164165 ifTrue : retT | Expression < retT > ,
165166 ifFalse : retT | Expression < retT >
@@ -220,8 +221,8 @@ type ParamInput<T> =
220221 | ( T extends string ? ResourceInput : never ) ;
221222
222223/**
223- * Specifies that a Param 's value should be determined by prompting the user
224- * to type it in interactively at deploy- time. Input that does not match the
224+ * Specifies that a parameter 's value should be determined by prompting the user
225+ * to type it in interactively at deploy time. Input that does not match the
225226 * provided validationRegex, if present, will be retried.
226227 */
227228// eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -243,7 +244,7 @@ export interface TextInput<T = unknown> {
243244}
244245
245246/**
246- * Specifies that a Param 's value should be determined by having the user
247+ * Specifies that a parameter 's value should be determined by having the user
247248 * select from a list containing all the project's resources of a certain
248249 * type. Currently, only type:"storage.googleapis.com/Bucket" is supported.
249250 */
@@ -253,15 +254,18 @@ export interface ResourceInput {
253254 } ;
254255}
255256
257+ /**
258+ * Autogenerate a list of buckets in a project that a user can select from.
259+ */
256260export const BUCKET_PICKER : ResourceInput = {
257261 resource : {
258262 type : "storage.googleapis.com/Bucket" ,
259263 } ,
260264} ;
261265
262266/**
263- * Specifies that a Param 's value should be determined by having the user select
264- * from a list of pre-canned options interactively at deploy- time.
267+ * Specifies that a parameter 's value should be determined by having the user select
268+ * from a list of pre-canned options interactively at deploy time.
265269 */
266270export interface SelectInput < T = unknown > {
267271 select : {
@@ -270,9 +274,9 @@ export interface SelectInput<T = unknown> {
270274}
271275
272276/**
273- * Specifies that a Param 's value should be determined by having the user select
274- * a subset from a list of pre-canned options interactively at deploy- time.
275- * Will result in errors if used on Params of type other than string[].
277+ * Specifies that a parameter 's value should be determined by having the user select
278+ * a subset from a list of pre-canned options interactively at deploy time.
279+ * Will result in errors if used on parameters of type other than ` string[]` .
276280 */
277281export interface MultiSelectInput {
278282 multiSelect : {
@@ -281,27 +285,27 @@ export interface MultiSelectInput {
281285}
282286
283287/**
284- * One of the options provided to a SelectInput, containing a value and
288+ * One of the options provided to a ` SelectInput` , containing a value and
285289 * optionally a human-readable label to display in the selection interface.
286290 */
287291export interface SelectOptions < T = unknown > {
288292 label ?: string ;
289293 value : T ;
290294}
291295
292- /** The wire representation of a Param when it's sent to the CLI. A superset of ParamOptions. */
296+ /** The wire representation of a parameter when it's sent to the CLI. A superset of ` ParamOptions` . */
293297export type ParamSpec < T extends string | number | boolean | string [ ] > = {
294298 /** The name of the parameter which will be stored in .env files. Use UPPERCASE. */
295299 name : string ;
296300 /** An optional default value to be used while prompting for input. Can be a literal or another parametrized expression. */
297301 default ?: T | Expression < T > ;
298- /** An optional human-readable string to be used as a replacement for the Param 's name when prompting. */
302+ /** An optional human-readable string to be used as a replacement for the parameter 's name when prompting. */
299303 label ?: string ;
300- /** An optional long-form description of the Param to be displayed while prompting. */
304+ /** An optional long-form description of the parameter to be displayed while prompting. */
301305 description ?: string ;
302306 /** @internal */
303307 type : ParamValueType ;
304- /** The way in which the Firebase CLI will prompt for the value of this Param . Defaults to a TextInput. */
308+ /** The way in which the Firebase CLI will prompt for the value of this parameter . Defaults to a TextInput. */
305309 input ?: ParamInput < T > ;
306310} ;
307311
@@ -322,7 +326,7 @@ export type WireParamSpec<T extends string | number | boolean | string[]> = {
322326 input ?: ParamInput < T > ;
323327} ;
324328
325- /** Configuration options which can be used to customize the prompting behavior of a Param . */
329+ /** Configuration options which can be used to customize the prompting behavior of a parameter . */
326330export type ParamOptions < T extends string | number | boolean | string [ ] > = Omit <
327331 ParamSpec < T > ,
328332 "name" | "type"
@@ -345,43 +349,43 @@ export abstract class Param<T extends string | number | boolean | string[]> exte
345349 throw new Error ( "Not implemented" ) ;
346350 }
347351
348- /** Returns a parametrized expression of Boolean type, based on comparing the value of this param to a literal or a different expression. */
352+ /** Returns a parametrized expression of Boolean type, based on comparing the value of this parameter to a literal or a different expression. */
349353 cmp ( cmp : "==" | "!=" | ">" | ">=" | "<" | "<=" , rhs : T | Expression < T > ) {
350354 return new CompareExpression < T > ( cmp , this , rhs ) ;
351355 }
352356
353- /** Returns a parametrized expression of Boolean type, based on comparing the value of this param to a literal or a different expression. */
357+ /** Returns a parametrized expression of Boolean type, based on comparing the value of this parameter to a literal or a different expression. */
354358 equals ( rhs : T | Expression < T > ) {
355359 return this . cmp ( "==" , rhs ) ;
356360 }
357361
358- /** Returns a parametrized expression of Boolean type, based on comparing the value of this param to a literal or a different expression. */
362+ /** Returns a parametrized expression of Boolean type, based on comparing the value of this parameter to a literal or a different expression. */
359363 notEquals ( rhs : T | Expression < T > ) {
360364 return this . cmp ( "!=" , rhs ) ;
361365 }
362366
363- /** Returns a parametrized expression of Boolean type, based on comparing the value of this param to a literal or a different expression. */
367+ /** Returns a parametrized expression of Boolean type, based on comparing the value of this parameter to a literal or a different expression. */
364368 greaterThan ( rhs : T | Expression < T > ) {
365369 return this . cmp ( ">" , rhs ) ;
366370 }
367371
368- /** Returns a parametrized expression of Boolean type, based on comparing the value of this param to a literal or a different expression. */
372+ /** Returns a parametrized expression of Boolean type, based on comparing the value of this parameter to a literal or a different expression. */
369373 greaterThanOrEqualTo ( rhs : T | Expression < T > ) {
370374 return this . cmp ( ">=" , rhs ) ;
371375 }
372376
373- /** Returns a parametrized expression of Boolean type, based on comparing the value of this param to a literal or a different expression. */
377+ /** Returns a parametrized expression of Boolean type, based on comparing the value of this parameter to a literal or a different expression. */
374378 lessThan ( rhs : T | Expression < T > ) {
375379 return this . cmp ( "<" , rhs ) ;
376380 }
377381
378- /** Returns a parametrized expression of Boolean type, based on comparing the value of this param to a literal or a different expression. */
382+ /** Returns a parametrized expression of Boolean type, based on comparing the value of this parameter to a literal or a different expression. */
379383 lessThanOrEqualTo ( rhs : T | Expression < T > ) {
380384 return this . cmp ( "<=" , rhs ) ;
381385 }
382386
383387 /**
384- * Returns a parametrized expression of Boolean type, based on comparing the value of this param to a literal or a different expression.
388+ * Returns a parametrized expression of Boolean type, based on comparing the value of this parameter to a literal or a different expression.
385389 * @deprecated A typo. Use lessThanOrEqualTo instead.
386390 */
387391 lessThanorEqualTo ( rhs : T | Expression < T > ) {
@@ -474,7 +478,7 @@ export class StringParam extends Param<string> {
474478/**
475479 * A CEL expression which represents an internal Firebase variable. This class
476480 * cannot be instantiated by developers, but we provide several canned instances
477- * of it to make available params that will never have to be defined at
481+ * of it to make available parameters that will never have to be defined at
478482 * deployment time, and can always be read from process.env.
479483 * @internal
480484 */
0 commit comments