Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated occurrences of String to string #152

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/Profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,44 @@ export interface KlaviyoProfileApi {
* Update a profile's external ID.
* @param externalId - The external ID to set
*/
setExternalId(externalId: String): void;
setExternalId(externalId: string): void;

/**
* Retrieve a profile's external ID.
* @param callback - The callback function to handle the response
*/
getExternalId(callback: Function | undefined): String | null;
getExternalId(callback: Function | undefined): string | null;

/**
* Update a profile's email address.
* @param email - The email address to set
*/
setEmail(email: String): void;
setEmail(email: string): void;

/**
* Retrieve a profile's email address.
* @param callback - The callback function to handle the response
*/
getEmail(callback: Function | undefined): String | null;
getEmail(callback: Function | undefined): string | null;

/**
* Update a profile's phone number.
* @param phoneNumber - The phone number to set
*/
setPhoneNumber(phoneNumber: String): void;
setPhoneNumber(phoneNumber: string): void;

/**
* Retrieve a profile's phone number.
* @param callback - The callback function to handle the response
*/
getPhoneNumber(callback: Function | undefined): String | null;
getPhoneNumber(callback: Function | undefined): string | null;

/**
* Update a profile's properties.
* @param propertyKey - The property key to set
* @param value - The property value to set
*/
setProfileAttribute(propertyKey: ProfilePropertyKey, value: String): void;
setProfileAttribute(propertyKey: ProfilePropertyKey, value: string): void;

/**
* Clear the current profile and set it to a new anonymous profile
Expand Down
4 changes: 2 additions & 2 deletions src/Push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export interface KlaviyoPushApi {
*
* @param token
*/
setPushToken(token: String): void;
setPushToken(token: string): void;

/**
* Get the push token for the current profile from the SDK
*
* @param callback
*/
getPushToken(callback: Function | undefined): String | null;
getPushToken(callback: Function | undefined): string | null;
}
20 changes: 10 additions & 10 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,40 @@ import type { Event } from './Event';
* Implementation of the {@link KlaviyoInterface}
*/
export const Klaviyo: Spec = {
initialize(apiKey: String): void {
initialize(apiKey: string): void {
KlaviyoReactNativeSdk.initialize(apiKey);
},
setProfile(profile: Profile): void {
KlaviyoReactNativeSdk.setProfile(formatProfile(profile));
},
setExternalId(externalId: String): void {
setExternalId(externalId: string): void {
KlaviyoReactNativeSdk.setExternalId(externalId);
},
getExternalId(callback: Function | undefined): String | null {
getExternalId(callback: Function | undefined): string | null {
return KlaviyoReactNativeSdk.getExternalId(callback);
},
setEmail(email: String): void {
setEmail(email: string): void {
KlaviyoReactNativeSdk.setEmail(email);
},
getEmail(callback: Function | undefined): String | null {
getEmail(callback: Function | undefined): string | null {
return KlaviyoReactNativeSdk.getEmail(callback);
},
setPhoneNumber(phoneNumber: String): void {
setPhoneNumber(phoneNumber: string): void {
KlaviyoReactNativeSdk.setPhoneNumber(phoneNumber);
},
getPhoneNumber(callback: Function | undefined): String | null {
getPhoneNumber(callback: Function | undefined): string | null {
return KlaviyoReactNativeSdk.getPhoneNumber(callback);
},
setProfileAttribute(propertyKey: ProfilePropertyKey, value: String): void {
setProfileAttribute(propertyKey: ProfilePropertyKey, value: string): void {
KlaviyoReactNativeSdk.setProfileAttribute(propertyKey, value);
},
resetProfile(): void {
KlaviyoReactNativeSdk.resetProfile();
},
setPushToken(token: String) {
setPushToken(token: string) {
KlaviyoReactNativeSdk.setPushToken(token);
},
getPushToken(callback: Function | undefined): String | null {
getPushToken(callback: Function | undefined): string | null {
return KlaviyoReactNativeSdk.getPushToken(callback);
},
createEvent(event: Event): void {
Expand Down