@nosto/types
v0.0.10
Published
Nosto Types
Readme
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,
- Include the following file inside
package.json, underdependenciessection, of any Javascript module"@nosto/types": "VERSION"(Replace VERSION with the latest version oftypesplugin) For e.g."@nosto/types": "9.0.0" - Importing nosto types into any JavaScript files which has
@nosto/typesadded intopackage.jsonimport { ANY_CLASS_OR_INTERFACE } from "@nosto/types"(Replace ANY_CLASS_OR_INTERFACE with an actual class or interface defined in types.ts) For e.g.import { PushedProduct} from "@nosto/types" - Using the imported class or interface in a JSDoc of a method
/*** @return {PushedProduct[]}*/export default function findProducts() {return []}
