# types

## Summary
This repository contains matching type definitions used by the Nosto client script. All the files generated are contained inside a single typescript file `types.ts`. Each class or interface definitions can be imported into any js files defined inside `javascript` module and then used as a part of JSDoc definition of JavaScript APIs and methods.

### Usage
In order to use types defined in this repository, please follow the steps below,
1. Include the following file inside `package.json`, under `dependencies` section, of any Javascript module
    > `"@nosto/types": "VERSION"` <br/>_(Replace VERSION with the latest version of `types` plugin)_ <br/>
    > For e.g. `"@nosto/types": "9.0.0"`
2. Importing nosto types into any JavaScript files which has `@nosto/types` added into `package.json`
    > `import { ANY_CLASS_OR_INTERFACE } from "@nosto/types"` <br/>_(Replace ANY_CLASS_OR_INTERFACE with an actual class or interface defined in types.ts)_ <br/>
    > For e.g. `import { PushedProduct} from "@nosto/types"`
3. Using the imported class or interface in a JSDoc of a method
    > `/**` <br/>
    > `* @return {PushedProduct[]}` <br/>
    > `*/` <br/>
    > `export default function findProducts() {` <br/>
    > `return []` <br/>
    > `}`
