-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove additional files from shortenedFiles (#638)
- Loading branch information
Showing
8 changed files
with
188 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
tests/stripe/check-3/s/stripe-js/src/main/scala/typings/stripeJs/distMod.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package typings.stripeJs | ||
|
||
import typings.stripeJs.distStripeJsStripeMod.Stripe | ||
import typings.stripeJs.distStripeJsStripeMod.StripeConstructor | ||
import typings.stripeJs.distStripeJsStripeMod.StripeConstructorOptions | ||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
object distMod { | ||
|
||
@JSImport("stripe-js/dist", JSImport.Namespace) | ||
@js.native | ||
val ^ : js.Any = js.native | ||
|
||
inline def loadStripe(publishableKey: String): js.Promise[Stripe | Null] = ^.asInstanceOf[js.Dynamic].applyDynamic("loadStripe")(publishableKey.asInstanceOf[js.Any]).asInstanceOf[js.Promise[Stripe | Null]] | ||
inline def loadStripe(publishableKey: String, options: StripeConstructorOptions): js.Promise[Stripe | Null] = (^.asInstanceOf[js.Dynamic].applyDynamic("loadStripe")(publishableKey.asInstanceOf[js.Any], options.asInstanceOf[js.Any])).asInstanceOf[js.Promise[Stripe | Null]] | ||
|
||
object global { | ||
|
||
trait Window extends StObject { | ||
|
||
// Stripe.js must be loaded directly from https://js.stripe.com/v3, which | ||
// places a `Stripe` object on the window | ||
var Stripe: js.UndefOr[StripeConstructor] = js.undefined | ||
} | ||
object Window { | ||
|
||
inline def apply(): Window = { | ||
val __obj = js.Dynamic.literal() | ||
__obj.asInstanceOf[Window] | ||
} | ||
|
||
@scala.inline | ||
implicit open class MutableBuilder[Self <: Window] (val x: Self) extends AnyVal { | ||
|
||
inline def setStripe(value: (/* publishableKey */ String, /* options */ js.UndefOr[StripeConstructorOptions]) => Stripe): Self = StObject.set(x, "Stripe", js.Any.fromFunction2(value)) | ||
|
||
inline def setStripeUndefined: Self = StObject.set(x, "Stripe", js.undefined) | ||
} | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
tests/stripe/check-3/s/stripe-js/src/main/scala/typings/stripeJs/distPureMod.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package typings.stripeJs | ||
|
||
import typings.stripeJs.anon.SetLoadParameters | ||
import typings.stripeJs.distStripeJsStripeMod.Stripe | ||
import typings.stripeJs.distStripeJsStripeMod.StripeConstructorOptions | ||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
object distPureMod { | ||
|
||
@JSImport("stripe-js/dist/pure", "loadStripe") | ||
@js.native | ||
val loadStripe: (js.Function2[ | ||
/* publishableKey */ String, | ||
/* options */ js.UndefOr[StripeConstructorOptions], | ||
js.Promise[Stripe | Null] | ||
]) & SetLoadParameters = js.native | ||
} |
17 changes: 17 additions & 0 deletions
17
tests/stripe/check-3/s/stripe-js/src/main/scala/typings/stripeJs/distSharedMod.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package typings.stripeJs | ||
|
||
import typings.stripeJs.distStripeJsStripeMod.Stripe | ||
import typings.stripeJs.distStripeJsStripeMod.StripeConstructorOptions | ||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
object distSharedMod { | ||
|
||
@JSImport("stripe-js/dist/shared", JSImport.Namespace) | ||
@js.native | ||
val ^ : js.Any = js.native | ||
|
||
inline def loadStripe(publishableKey: String): js.Promise[Stripe | Null] = ^.asInstanceOf[js.Dynamic].applyDynamic("loadStripe")(publishableKey.asInstanceOf[js.Any]).asInstanceOf[js.Promise[Stripe | Null]] | ||
inline def loadStripe(publishableKey: String, options: StripeConstructorOptions): js.Promise[Stripe | Null] = (^.asInstanceOf[js.Dynamic].applyDynamic("loadStripe")(publishableKey.asInstanceOf[js.Any], options.asInstanceOf[js.Any])).asInstanceOf[js.Promise[Stripe | Null]] | ||
} |
94 changes: 94 additions & 0 deletions
94
tests/stripe/check-3/s/stripe-js/src/main/scala/typings/stripeJs/distStripeJsStripeMod.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
package typings.stripeJs | ||
|
||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
object distStripeJsStripeMod { | ||
|
||
trait Stripe extends StObject { | ||
|
||
def foo(): Unit | ||
} | ||
object Stripe { | ||
|
||
inline def apply(foo: () => Unit): Stripe = { | ||
val __obj = js.Dynamic.literal(foo = js.Any.fromFunction0(foo)) | ||
__obj.asInstanceOf[Stripe] | ||
} | ||
|
||
@scala.inline | ||
implicit open class MutableBuilder[Self <: Stripe] (val x: Self) extends AnyVal { | ||
|
||
inline def setFoo(value: () => Unit): Self = StObject.set(x, "foo", js.Any.fromFunction0(value)) | ||
} | ||
} | ||
|
||
type StripeConstructor = js.Function2[ | ||
/* publishableKey */ String, | ||
/* options */ js.UndefOr[StripeConstructorOptions], | ||
Stripe | ||
] | ||
|
||
trait StripeConstructorOptions extends StObject { | ||
|
||
/** | ||
* Override your account's [API version](https://stripe.com/docs/api/versioning). | ||
*/ | ||
var apiVersion: js.UndefOr[String] = js.undefined | ||
|
||
/** | ||
* Opt-in to prerelease Stripe.js features by passing `betas` when instantiating a `Stripe` object. | ||
* | ||
* Supported values for the `betas` option can be found in integration guides for prerelease features. | ||
* Most users of Stripe.js do not pass this option. | ||
*/ | ||
var betas: js.UndefOr[js.Array[String]] = js.undefined | ||
|
||
/** | ||
* The [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) used to globally configure localization in Stripe.js. | ||
* Setting the locale here will localize error strings for all Stripe.js methods. | ||
* It will also configure the locale for [Elements](#element_mount) and [Checkout](https://stripe.com/docs/js/checkout/redirect_to_checkout). Default is `auto` (Stripe detects the locale of the browser). | ||
* | ||
* Supported values depend on which features you are using. | ||
* Checkout supports a slightly different set of locales than the rest of Stripe.js. | ||
* If you are planning on using Checkout, make sure to use a [value](#checkout_redirect_to_checkout-options-locale) that it supports. | ||
*/ | ||
var locale: js.UndefOr[String] = js.undefined | ||
|
||
/** | ||
* For usage with [Connect](https://stripe.com/docs/connect) only. | ||
* Specifying a connected account ID (e.g., `acct_24BFMpJ1svR5A89k`) allows you to perform actions on behalf of that account. | ||
*/ | ||
var stripeAccount: js.UndefOr[String] = js.undefined | ||
} | ||
object StripeConstructorOptions { | ||
|
||
inline def apply(): StripeConstructorOptions = { | ||
val __obj = js.Dynamic.literal() | ||
__obj.asInstanceOf[StripeConstructorOptions] | ||
} | ||
|
||
@scala.inline | ||
implicit open class MutableBuilder[Self <: StripeConstructorOptions] (val x: Self) extends AnyVal { | ||
|
||
inline def setApiVersion(value: String): Self = StObject.set(x, "apiVersion", value.asInstanceOf[js.Any]) | ||
|
||
inline def setApiVersionUndefined: Self = StObject.set(x, "apiVersion", js.undefined) | ||
|
||
inline def setBetas(value: js.Array[String]): Self = StObject.set(x, "betas", value.asInstanceOf[js.Any]) | ||
|
||
inline def setBetasUndefined: Self = StObject.set(x, "betas", js.undefined) | ||
|
||
inline def setBetasVarargs(value: String*): Self = StObject.set(x, "betas", js.Array(value*)) | ||
|
||
inline def setLocale(value: String): Self = StObject.set(x, "locale", value.asInstanceOf[js.Any]) | ||
|
||
inline def setLocaleUndefined: Self = StObject.set(x, "locale", js.undefined) | ||
|
||
inline def setStripeAccount(value: String): Self = StObject.set(x, "stripeAccount", value.asInstanceOf[js.Any]) | ||
|
||
inline def setStripeAccountUndefined: Self = StObject.set(x, "stripeAccount", js.undefined) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters