Skip to content

Commit

Permalink
Change @returns statement to use function instead of Cloud Function (#…
Browse files Browse the repository at this point in the history
…1232)

* resolve conflicts

* remove alpha after merge
  • Loading branch information
colerogers authored Oct 3, 2022
1 parent ed62824 commit f22dfcf
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 deletions.
9 changes: 4 additions & 5 deletions src/v1/providers/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export class RefBuilder<Ref extends string> {
*
* @param handler Event handler that runs every time a Firebase Realtime Database
* write occurs.
* @returns A Cloud Function that you can export and deploy.
* @returns A function that you can export and deploy.
*/
onWrite(
handler: (
Expand All @@ -192,8 +192,7 @@ export class RefBuilder<Ref extends string> {
*
* @param handler Event handler which is run every time a Firebase Realtime Database
* write occurs.
* @returns A Cloud
* Function which you can export and deploy.
* @returns A function which you can export and deploy.
*/
onUpdate(
handler: (
Expand All @@ -210,7 +209,7 @@ export class RefBuilder<Ref extends string> {
*
* @param handler Event handler that runs every time new data is created in
* Firebase Realtime Database.
* @returns A Cloud Function that you can export and deploy.
* @returns A function that you can export and deploy.
*/
onCreate(
handler: (
Expand All @@ -234,7 +233,7 @@ export class RefBuilder<Ref extends string> {
*
* @param handler Event handler that runs every time data is deleted from
* Firebase Realtime Database.
* @returns A Cloud Function that you can export and deploy.
* @returns A function that you can export and deploy.
*/
onDelete(
handler: (
Expand Down
4 changes: 2 additions & 2 deletions src/v1/providers/pubsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class TopicBuilder {
*
* @param handler - Event handler that runs every time a Cloud Pub/Sub message
* is published.
* @returns A Cloud Function that you can export and deploy.
* @returns A function that you can export and deploy.
*/
onPublish(
handler: (message: Message, context: EventContext) => PromiseLike<any> | any
Expand Down Expand Up @@ -142,7 +142,7 @@ export class ScheduleBuilder {
*
* @param handler - Handler that fires whenever the associated
* scheduler job sends a Pub/Sub message.
* @returns A Cloud Function that you can export and deploy.
* @returns A function that you can export and deploy.
*/
onRun(handler: (context: EventContext) => PromiseLike<any> | any) {
const cloudFunction = makeCloudFunction({
Expand Down
2 changes: 1 addition & 1 deletion src/v1/providers/remoteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const service = "firebaseremoteconfig.googleapis.com";
* @param handler A function that takes the updated Remote Config
* template version metadata as an argument.
*
* @returns A Cloud Function that you can export and deploy.
* @returns A function that you can export and deploy.
*/
export function onUpdate(
handler: (version: TemplateVersion, context: EventContext) => PromiseLike<any> | any
Expand Down
8 changes: 4 additions & 4 deletions src/v1/providers/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class ObjectBuilder {
* @param handler Event handler which is run every time a Google Cloud Storage
* archival occurs.
*
* @returns A Cloud Function which you can export and deploy.
* @returns A function which you can export and deploy.
*/
onArchive(
handler: (object: ObjectMetadata, context: EventContext) => PromiseLike<any> | any
Expand All @@ -132,7 +132,7 @@ export class ObjectBuilder {
* @param handler Event handler which is run every time a Google Cloud Storage
* deletion occurs.
*
* @returns A Cloud Function which you can export and deploy.
* @returns A function which you can export and deploy.
*/
onDelete(
handler: (object: ObjectMetadata, context: EventContext) => PromiseLike<any> | any
Expand All @@ -151,7 +151,7 @@ export class ObjectBuilder {
* @param handler Event handler which is run every time a Google Cloud Storage
* object creation occurs.
*
* @returns A Cloud Function which you can export and deploy.
* @returns A function which you can export and deploy.
*/
onFinalize(
handler: (object: ObjectMetadata, context: EventContext) => PromiseLike<any> | any
Expand All @@ -166,7 +166,7 @@ export class ObjectBuilder {
* @param handler Event handler which is run every time a Google Cloud Storage
* metadata update occurs.
*
* @returns A Cloud Function which you can export and deploy.
* @returns A function which you can export and deploy.
*/
onMetadataUpdate(
handler: (object: ObjectMetadata, context: EventContext) => PromiseLike<any> | any
Expand Down
2 changes: 1 addition & 1 deletion src/v1/providers/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class TaskQueueBuilder {
/**
* Creates a handler for tasks sent to a Google Cloud Tasks queue.
* @param handler - A callback to handle task requests.
* @returns A Cloud Function you can export and deploy.
* @returns A function you can export and deploy.
*/
onDispatch(
handler: (data: any, context: TaskContext) => void | Promise<void>
Expand Down
6 changes: 3 additions & 3 deletions src/v2/providers/remoteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export interface ConfigUpdateData {
* Event handler which triggers when data is updated in a Remote Config.
*
* @param handler - Event handler which is run every time a Remote Config update occurs.
* @returns A Cloud Function that you can export and deploy.
* @returns A function that you can export and deploy.
*/
export function onConfigUpdated(
handler: (event: CloudEvent<ConfigUpdateData>) => any | Promise<any>
Expand All @@ -100,7 +100,7 @@ export function onConfigUpdated(
*
* @param opts - Options that can be set on an individual event-handling function.
* @param handler - Event handler which is run every time a Remote Config update occurs.
* @returns A Cloud Function that you can export and deploy.
* @returns A function that you can export and deploy.
*/
export function onConfigUpdated(
opts: EventHandlerOptions,
Expand All @@ -112,7 +112,7 @@ export function onConfigUpdated(
*
* @param optsOrHandler - Options or an event handler.
* @param handler - Event handler which is run every time a Remote Config update occurs.
* @returns A Cloud Function that you can export and deploy.
* @returns A function that you can export and deploy.
*/
export function onConfigUpdated(
optsOrHandler:
Expand Down
4 changes: 2 additions & 2 deletions src/v2/providers/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export interface TaskQueueFunction<T = any> extends HttpsFunction {
* Creates a handler for tasks sent to a Google Cloud Tasks queue.
* @param handler - A callback to handle task requests.
* @typeParam Args - The interface for the request's `data` field.
* @returns A Cloud Function you can export and deploy.
* @returns A function you can export and deploy.
*/
export function onTaskDispatched<Args = any>(
handler: (request: Request<Args>) => void | Promise<void>
Expand All @@ -179,7 +179,7 @@ export function onTaskDispatched<Args = any>(
* @param options - Configuration for the task queue or Cloud Function.
* @param handler - A callback to handle task requests.
* @typeParam Args - The interface for the request's `data` field.
* @returns A Cloud Function you can export and deploy.
* @returns A function you can export and deploy.
*/
export function onTaskDispatched<Args = any>(
options: TaskQueueOptions,
Expand Down

0 comments on commit f22dfcf

Please sign in to comment.