Skip to content

Commit

Permalink
fix(types, perf): add void return types to untyped perf methods
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgovea committed Sep 25, 2020
1 parent 9056028 commit 19b7db1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/perf/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export namespace FirebasePerformanceTypes {
* @param attribute Name of the attribute. Max length is 40 chars.
* @param value Value of the attribute. Max length is 100 chars.
*/
putAttribute(attribute: string, value: string);
putAttribute(attribute: string, value: string): void;

/**
* Gets the value of the metric with the given name in the current trace. If the metric
Expand Down Expand Up @@ -155,7 +155,7 @@ export namespace FirebasePerformanceTypes {
* @param metricName Name of the metric to set. Must not have a leading or trailing whitespace, no leading underscore '_' character and have a max length of 32 characters.
* @param value The value the metric should be set to.
*/
putMetric(metricName: string, value: number);
putMetric(metricName: string, value: number): void;

/**
* Increments the named metric by the `incrementBy` value.
Expand All @@ -169,7 +169,7 @@ export namespace FirebasePerformanceTypes {
* @param metricName Name of the metric to increment. Must not have a leading or trailing whitespace, no leading underscore '_' character and have a max length of 32 characters.
* @param incrementBy The value the metric should be incremented by.
*/
incrementMetric(metricName: string, incrementBy: number);
incrementMetric(metricName: string, incrementBy: number): void;

/**
* Removes a metric by name if it exists.
Expand All @@ -182,7 +182,7 @@ export namespace FirebasePerformanceTypes {
*
* @param metricName Name of the metric to remove.
*/
removeMetric(metricName: string);
removeMetric(metricName: string): void;

/**
* Marks the start time of the trace. Does nothing if already started.
Expand Down Expand Up @@ -256,7 +256,7 @@ export namespace FirebasePerformanceTypes {
* @param attribute Name of the attribute. Max length is 40 chars.
* @param value Value of the attribute. Max length is 100 chars.
*/
putAttribute(attribute: string, value: string);
putAttribute(attribute: string, value: string): void;

/**
* Removes an already added attribute. Does nothing if attribute does not exist.
Expand All @@ -269,7 +269,7 @@ export namespace FirebasePerformanceTypes {
*
* @param attribute Name of the attribute to be removed.
*/
removeAttribute(attribute: string);
removeAttribute(attribute: string): void;

/**
* Sets the httpResponse code of the request.
Expand All @@ -285,7 +285,7 @@ export namespace FirebasePerformanceTypes {
*
* @param code Value must be greater than 0. Set to null to remove. Invalid usage will be logged natively.
*/
setHttpResponseCode(code: number | null);
setHttpResponseCode(code: number | null): void;

/**
* Sets the size of the request payload.
Expand All @@ -299,7 +299,7 @@ export namespace FirebasePerformanceTypes {
*
* @param bytes Value must be greater than 0. Set to null to remove. Invalid usage will be logged natively.
*/
setRequestPayloadSize(bytes: number | null);
setRequestPayloadSize(bytes: number | null): void;

/**
* Sets the size of the response payload.
Expand All @@ -313,7 +313,7 @@ export namespace FirebasePerformanceTypes {
*
* @param bytes Value must be greater than 0. Set to null to remove. Invalid usage will be logged natively.
*/
setResponsePayloadSize(bytes: number | null);
setResponsePayloadSize(bytes: number | null): void;

/**
* Content type of the response e.g. `text/html` or `application/json`.
Expand All @@ -327,7 +327,7 @@ export namespace FirebasePerformanceTypes {
*
* @param contentType Valid string of MIME type. Set to null to remove. Invalid usage will be logged natively.
*/
setResponseContentType(contentType: string | null);
setResponseContentType(contentType: string | null): void;

/**
* Marks the start time of the request. Does nothing if already started.
Expand Down

0 comments on commit 19b7db1

Please sign in to comment.