forked from ScalablyTyped/Converter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
165 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
organization := "org.scalablytyped" | ||
name := "stripe-js" | ||
version := "4.1.0-084381" | ||
scalaVersion := "3.3.1" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) |
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 @@ | ||
sbt.version=1.9.6 |
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 @@ | ||
addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "1.11.0") |
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,16 @@ | ||
|
||
# Scala.js typings for stripe-js | ||
|
||
Typings are for version 4.1.0 | ||
|
||
|
||
|
||
## Note | ||
This library has been generated from typescript code from first party type definitions. | ||
|
||
Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) | ||
|
||
## Usage | ||
See [the main readme](../../readme.md) for instructions. | ||
|
||
|
16 changes: 16 additions & 0 deletions
16
tests/stripe/check-3/s/stripe-js/src/main/resources/NPM_DEPENDENCIES
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,16 @@ | ||
{ | ||
"compile-dependencies" : [ | ||
{ | ||
"stripe-js" : "4.1.0" | ||
} | ||
], | ||
"test-dependencies" : [ | ||
{ | ||
"stripe-js" : "4.1.0" | ||
} | ||
], | ||
"compile-devDependencies" : [ | ||
], | ||
"test-devDependencies" : [ | ||
] | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/stripe/check-3/s/stripe-js/src/main/scala/typings/stripeJs/stripeJsRequire.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,11 @@ | ||
package typings.stripeJs | ||
|
||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
/* This can be used to `require` the library as a side effect. | ||
If it is a global library this will make scalajs-bundler include it */ | ||
@JSImport("stripe-js", JSImport.Namespace) | ||
@js.native | ||
object stripeJsRequire extends StObject |
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,4 @@ | ||
/// <reference no-default-lib="true"/> | ||
|
||
declare interface Promise<T> {} | ||
interface Array<T> {} |
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,11 @@ | ||
import {StripeConstructor} from './stripe-js'; | ||
|
||
export {loadStripe} from './shared'; | ||
|
||
declare global { | ||
interface Window { | ||
// Stripe.js must be loaded directly from https://js.stripe.com/v3, which | ||
// places a `Stripe` object on the window | ||
Stripe?: StripeConstructor; | ||
} | ||
} |
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,5 @@ | ||
import {loadStripe as _loadStripe} from './shared'; | ||
|
||
export const loadStripe: typeof _loadStripe & { | ||
setLoadParameters: (params: {advancedFraudSignals: boolean}) => void; | ||
}; |
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,6 @@ | ||
import {StripeConstructorOptions, Stripe} from './stripe-js'; | ||
|
||
export const loadStripe: ( | ||
publishableKey: string, | ||
options?: StripeConstructorOptions | undefined | ||
) => Promise<Stripe | null>; |
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 @@ | ||
export * from './stripe'; |
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,49 @@ | ||
export interface Stripe { | ||
foo(): void | ||
} | ||
|
||
export interface StripeConstructor { | ||
( | ||
/** | ||
* Your publishable key. | ||
*/ | ||
publishableKey: string, | ||
|
||
/** | ||
* Initialization options. | ||
*/ | ||
options?: StripeConstructorOptions | ||
): Stripe; | ||
} | ||
|
||
export interface StripeConstructorOptions { | ||
/** | ||
* 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. | ||
*/ | ||
stripeAccount?: string; | ||
|
||
/** | ||
* Override your account's [API version](https://stripe.com/docs/api/versioning). | ||
*/ | ||
apiVersion?: string; | ||
|
||
/** | ||
* 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. | ||
*/ | ||
locale?: string; | ||
|
||
/** | ||
* 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. | ||
*/ | ||
betas?: string[]; | ||
} |
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,14 @@ | ||
//export * from '../dist'; | ||
|
||
// import {loadStripe} from '../dist'; | ||
// export {loadStripe}; | ||
|
||
import {StripeConstructor} from "../dist/stripe-js"; | ||
|
||
declare global { | ||
interface Window { | ||
// Stripe.js must be loaded directly from https://js.stripe.com/v3, which | ||
// places a `Stripe` object on the window | ||
Stripe?: StripeConstructor; | ||
} | ||
} |
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 @@ | ||
{ | ||
"name": "@stripe/stripe-js", | ||
"version": "4.1.0", | ||
"description": "Stripe.js loading utility", | ||
"repository": "github:stripe/stripe-js", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"typings": "lib/index.d.ts", | ||
"author": "Stripe (https://www.stripe.com)", | ||
"license": "MIT", | ||
"homepage": "https://stripe.com/docs/js", | ||
"files": [ | ||
"dist", | ||
"lib" | ||
], | ||
"engines": { | ||
"node": ">=12.16" | ||
} | ||
} |