Skip to content

An NPM-installable Typescript declaration for the Shopify frontend wrapper.

License

Notifications You must be signed in to change notification settings

nozzlegear/shopify.d.ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shopify.d.ts

An NPM-installable Typescript declaration for the Shopify frontend wrapper.

Installation

For Typescript 2.0+, just install this package via NPM or Yarn.

npm install github:nozzlegear/shopify.d.ts#COMMIT --save-dev

# Or use Yarn
yarn add github:nozzlegear/shopify.d.ts#COMMIT --dev

Usage

The Shopify frontend wrapper will automatically load the Shopify object into the browser window. Once this declaration is installed, you'll automatically have intellisense and typings for that Shopify object:

// You can immediately use the Shopify variable in your .ts and .tsx files.
Shopify.getCart();

// You can also import interfaces used by that Shopify variable
import { Option, Variant } from "shopify";

const option: Option = ...;
...

About

An NPM-installable Typescript declaration for the Shopify frontend wrapper.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published