Skip to content

Commit 027f1b7

Browse files
committed
change @returns statement to use function instead of Cloud Function
1 parent 77f905e commit 027f1b7

File tree

7 files changed

+17
-18
lines changed

7 files changed

+17
-18
lines changed

src/v1/providers/database.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export class RefBuilder<Ref extends string> {
175175
*
176176
* @param handler Event handler that runs every time a Firebase Realtime Database
177177
* write occurs.
178-
* @returns A Cloud Function that you can export and deploy.
178+
* @returns A function that you can export and deploy.
179179
*/
180180
onWrite(
181181
handler: (
@@ -192,8 +192,7 @@ export class RefBuilder<Ref extends string> {
192192
*
193193
* @param handler Event handler which is run every time a Firebase Realtime Database
194194
* write occurs.
195-
* @returns A Cloud
196-
* Function which you can export and deploy.
195+
* @returns A function which you can export and deploy.
197196
*/
198197
onUpdate(
199198
handler: (
@@ -210,7 +209,7 @@ export class RefBuilder<Ref extends string> {
210209
*
211210
* @param handler Event handler that runs every time new data is created in
212211
* Firebase Realtime Database.
213-
* @returns A Cloud Function that you can export and deploy.
212+
* @returns A function that you can export and deploy.
214213
*/
215214
onCreate(
216215
handler: (
@@ -234,7 +233,7 @@ export class RefBuilder<Ref extends string> {
234233
*
235234
* @param handler Event handler that runs every time data is deleted from
236235
* Firebase Realtime Database.
237-
* @returns A Cloud Function that you can export and deploy.
236+
* @returns A function that you can export and deploy.
238237
*/
239238
onDelete(
240239
handler: (

src/v1/providers/pubsub.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class TopicBuilder {
6868
*
6969
* @param handler - Event handler that runs every time a Cloud Pub/Sub message
7070
* is published.
71-
* @returns A Cloud Function that you can export and deploy.
71+
* @returns A function that you can export and deploy.
7272
*/
7373
onPublish(
7474
handler: (message: Message, context: EventContext) => PromiseLike<any> | any
@@ -142,7 +142,7 @@ export class ScheduleBuilder {
142142
*
143143
* @param handler - Handler that fires whenever the associated
144144
* scheduler job sends a Pub/Sub message.
145-
* @returns A Cloud Function that you can export and deploy.
145+
* @returns A function that you can export and deploy.
146146
*/
147147
onRun(handler: (context: EventContext) => PromiseLike<any> | any) {
148148
const cloudFunction = makeCloudFunction({

src/v1/providers/remoteConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const service = "firebaseremoteconfig.googleapis.com";
3535
* @param handler A function that takes the updated Remote Config
3636
* template version metadata as an argument.
3737
*
38-
* @returns A Cloud Function that you can export and deploy.
38+
* @returns A function that you can export and deploy.
3939
*/
4040
export function onUpdate(
4141
handler: (version: TemplateVersion, context: EventContext) => PromiseLike<any> | any

src/v1/providers/storage.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export class ObjectBuilder {
112112
* @param handler Event handler which is run every time a Google Cloud Storage
113113
* archival occurs.
114114
*
115-
* @returns A Cloud Function which you can export and deploy.
115+
* @returns A function which you can export and deploy.
116116
*/
117117
onArchive(
118118
handler: (object: ObjectMetadata, context: EventContext) => PromiseLike<any> | any
@@ -132,7 +132,7 @@ export class ObjectBuilder {
132132
* @param handler Event handler which is run every time a Google Cloud Storage
133133
* deletion occurs.
134134
*
135-
* @returns A Cloud Function which you can export and deploy.
135+
* @returns A function which you can export and deploy.
136136
*/
137137
onDelete(
138138
handler: (object: ObjectMetadata, context: EventContext) => PromiseLike<any> | any
@@ -151,7 +151,7 @@ export class ObjectBuilder {
151151
* @param handler Event handler which is run every time a Google Cloud Storage
152152
* object creation occurs.
153153
*
154-
* @returns A Cloud Function which you can export and deploy.
154+
* @returns A function which you can export and deploy.
155155
*/
156156
onFinalize(
157157
handler: (object: ObjectMetadata, context: EventContext) => PromiseLike<any> | any
@@ -166,7 +166,7 @@ export class ObjectBuilder {
166166
* @param handler Event handler which is run every time a Google Cloud Storage
167167
* metadata update occurs.
168168
*
169-
* @returns A Cloud Function which you can export and deploy.
169+
* @returns A function which you can export and deploy.
170170
*/
171171
onMetadataUpdate(
172172
handler: (object: ObjectMetadata, context: EventContext) => PromiseLike<any> | any

src/v1/providers/tasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class TaskQueueBuilder {
9090
/**
9191
* Creates a handler for tasks sent to a Google Cloud Tasks queue.
9292
* @param handler - A callback to handle task requests.
93-
* @returns A Cloud Function you can export and deploy.
93+
* @returns A function you can export and deploy.
9494
*/
9595
onDispatch(
9696
handler: (data: any, context: TaskContext) => void | Promise<void>

src/v2/providers/remoteConfig.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export interface ConfigUpdateData {
8989
* Event handler which triggers when data is updated in a Remote Config.
9090
*
9191
* @param handler - Event handler which is run every time a Remote Config update occurs.
92-
* @returns A Cloud Function that you can export and deploy.
92+
* @returns A function that you can export and deploy.
9393
* @alpha
9494
*/
9595
export function onConfigUpdated(
@@ -101,7 +101,7 @@ export function onConfigUpdated(
101101
*
102102
* @param opts - Options that can be set on an individual event-handling function.
103103
* @param handler - Event handler which is run every time a Remote Config update occurs.
104-
* @returns A Cloud Function that you can export and deploy.
104+
* @returns A function that you can export and deploy.
105105
* @alpha
106106
*/
107107
export function onConfigUpdated(
@@ -114,7 +114,7 @@ export function onConfigUpdated(
114114
*
115115
* @param optsOrHandler - Options or an event handler.
116116
* @param handler - Event handler which is run every time a Remote Config update occurs.
117-
* @returns A Cloud Function that you can export and deploy.
117+
* @returns A function that you can export and deploy.
118118
* @alpha
119119
*/
120120
export function onConfigUpdated(

src/v2/providers/tasks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export interface TaskQueueFunction<T = any> extends HttpsFunction {
168168
* Creates a handler for tasks sent to a Google Cloud Tasks queue.
169169
* @param handler - A callback to handle task requests.
170170
* @typeParam Args - The interface for the request's `data` field.
171-
* @returns A Cloud Function you can export and deploy.
171+
* @returns A function you can export and deploy.
172172
*/
173173
export function onTaskDispatched<Args = any>(
174174
handler: (request: Request<Args>) => void | Promise<void>
@@ -179,7 +179,7 @@ export function onTaskDispatched<Args = any>(
179179
* @param options - Configuration for the task queue or Cloud Function.
180180
* @param handler - A callback to handle task requests.
181181
* @typeParam Args - The interface for the request's `data` field.
182-
* @returns A Cloud Function you can export and deploy.
182+
* @returns A function you can export and deploy.
183183
*/
184184
export function onTaskDispatched<Args = any>(
185185
options: TaskQueueOptions,

0 commit comments

Comments
 (0)