add RewardedAdOptions

DreamingCodes committed Aug 2, 2024 at 21:07 UTC f4d639141aa9b9b93cfd95a027fdfd11ffe933c6
2 files changed +26 -18
guest-js/ads/interstitial.ts
-16
@@ -15,19 +15,3 @@ export class InterstitialAd extends MobileAd {
15 return super.show()
16 }
17 }
18 -
19 -export class RewardedInterstitialAd extends MobileAd {
20 - static cls = 'RewardedInterstitialAd'
21 -
22 - isLoaded() {
23 - return super.isLoaded()
24 - }
25 -
26 - async load() {
27 - return super.load()
28 - }
29 -
30 - async show() {
31 - return super.show()
32 - }
33 -}
guest-js/ads/rewarded.ts
+26 -2
@@ -1,6 +1,6 @@
1 -import {MobileAd} from "./common";
1 +import {MobileAd, MobileAdOptions} from "./common";
2
3 -export class RewardedAd extends MobileAd {
3 +export class RewardedAd extends MobileAd<RewardedAdOptions> {
4 static cls = 'RewardedAd'
5
6 isLoaded() {
@@ -15,3 +15,27 @@ export class RewardedAd extends MobileAd {
15 return super.show()
16 }
17 }
18 +
19 +export class RewardedInterstitialAd extends MobileAd<RewardedAdOptions> {
20 + static cls = 'RewardedInterstitialAd'
21 +
22 + isLoaded() {
23 + return super.isLoaded()
24 + }
25 +
26 + async load() {
27 + return super.load()
28 + }
29 +
30 + async show() {
31 + return super.show()
32 + }
33 +}
34 +
35 +
36 +export interface RewardedAdOptions extends MobileAdOptions {
37 + serverSideVerification?: {
38 + userId?: string;
39 + customData?: string;
40 + };
41 +}