@square/web-payments-sdk-types

Types for Square's Web Payments SDK

Usage no npm install needed!

<script type="module">
  import squareWebPaymentsSdkTypes from 'https://cdn.skypack.dev/@square/web-payments-sdk-types';
</script>

README

web-payments-sdk-types

@square/web-payments-sdk-types is package of TypeScript type definitions for the Web Payments SDK.

The types defined in this package are documented in the Developer Reference for Web Payments SDK.

Use

This package uses declaration files (d.ts). Once this package is added to the typeRoots as part of the tsconfig.json, initiating a payments instance using window.Square.payments will provide typechecking and autocompletion automatically. Developers can also import any type definition listed in the developer reference.

LICENSE

Copyright 2021 Square, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.