Typescript definitions not included in npm package
See original GitHub issueAlthough merged in #35 npm package does not include ts definitions. Version 1.0.1
package.json from installed module for reference:
{
"_from": "@woocommerce/woocommerce-rest-api",
"_id": "@woocommerce/woocommerce-rest-api@1.0.1",
"_inBundle": false,
"_integrity": "sha512-YBk3EEYE0zax/egx6Rhpbu6hcCFyZpYQrjH9JO4NUGU3n3T0W9Edn7oAUbjL/c7Oezcg+UaQluCaKjY/B3zwxg==",
"_location": "/@woocommerce/woocommerce-rest-api",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "@woocommerce/woocommerce-rest-api",
"name": "@woocommerce/woocommerce-rest-api",
"escapedName": "@woocommerce%2fwoocommerce-rest-api",
"scope": "@woocommerce",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/@woocommerce/woocommerce-rest-api/-/woocommerce-rest-api-1.0.1.tgz",
"_shasum": "112b998e8e3758203a71d5e3e0b24efcb1cff842",
"_spec": "@woocommerce/woocommerce-rest-api",
"_where": "/Users/florian/Github Repositories/jarvis-serverless",
"author": {
"name": "Automattic"
},
"bugs": {
"url": "https://github.com/woocommerce/woocommerce-rest-api-js/issues"
},
"bundleDependencies": false,
"dependencies": {
"axios": "^0.19.0",
"create-hmac": "^1.1.7",
"oauth-1.0a": "^2.2.6",
"url-parse": "^1.4.7"
},
"deprecated": false,
"description": "WooCommerce REST API - JavaScript Library",
"devDependencies": {
"@babel/cli": "7.5.5",
"@babel/core": "7.5.5",
"@babel/plugin-transform-modules-commonjs": "7.5.0",
"@babel/preset-env": "7.5.5",
"babel-jest": "24.8.0",
"del-cli": "2.0.0",
"eslint": "6.1.0",
"eslint-config-prettier": "6.0.0",
"eslint-config-standard": "13.0.1",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jest": "22.14.1",
"eslint-plugin-node": "9.1.0",
"eslint-plugin-prettier": "3.1.0",
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-standard": "4.0.0",
"husky": "3.0.2",
"jest": "24.8.0",
"lint-staged": "9.2.1",
"nock": "10.0.6",
"prettier": "1.18.2"
},
"engines": {
"node": ">=8.0.0"
},
"files": [
"index.js",
"index.mjs"
],
"homepage": "https://github.com/woocommerce/woocommerce-rest-api-js-lib",
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"keywords": [
"wordpress",
"woocommerce",
"rest",
"promise",
"node"
],
"license": "MIT",
"lint-staged": {
"*.{js,mjs}": [
"eslint --fix",
"prettier --write",
"git add"
]
},
"main": "index",
"name": "@woocommerce/woocommerce-rest-api",
"repository": {
"type": "git",
"url": "git+https://github.com/woocommerce/woocommerce-rest-api-js.git"
},
"scripts": {
"build": "del index.js && babel index.mjs --out-dir .",
"format": "prettier --write \"*.mjs\" \"test.js\"",
"lint": "eslint *.mjs",
"postversion": "git push && git push --tags",
"prepare": "npm run build",
"prepublishOnly": "npm test && npm run lint",
"preversion": "npm run lint",
"test": "jest",
"version": "npm run format && git add -A"
},
"version": "1.0.1"
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Documentation - Publishing - TypeScript
All dependencies are managed by npm. Make sure all the declaration packages you depend on are marked appropriately in the "dependencies" section in...
Read more >How to add a typescript definition file to a npm package?
Try to load a file named index.d.ts located in the package folder (node_modules/foo/) - this file should contain typings for the package. The ......
Read more >Type definitions bundled with npm modules are not ... - GitHub
I have a JS project that depends on mobx and other libs that include its own type definitions bundled and properly declared in...
Read more >Typescript Typings: The Complete Guide: @types Compiler ...
npm install --save-dev typescript ... So how can it be that the compiler does not find the module? ... Missing Node Type Definitions....
Read more >How to link a npm package with its types - Digital Fortress
json) to tell the typeScript complier to generate .d.ts definition files from the type definitions found in .ts / .tsx files. Inline types...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

You can check in npmjs.com. Version 1.0.1 is published a year ago. The new version still haven’t published. I am thinking of publish the typing in @DefinitelyTyped instead of waiting this package to be updated.
I cant make all of those params and data because all endpoint share the same function.