Add the TypeScript Declaration File to your distribution
Closed this issue · 2 comments
jeffrose commented
You have stacktrace-js.d.ts in your project but it isn't part of your distribution because it's not in the files entry in your package.json.
You should also add types and typings entries so it's automatically found.
{
"name": "stacktrace-js",
"description": "Framework-agnostic, micro-library for getting stack traces in all environments",
"maintainers": [
"Eric Wendelin <me@eriwen.com> (https://www.eriwen.com)",
"Victor Homyakov <vkhomyackov@gmail.com> (https://github.com/victor-homyakov)",
"Oliver Salzburg (https://github.com/oliversalzburg)"
],
"version": "2.0.0",
"license": "MIT",
"keywords": [
"stacktrace",
"error",
"debugger",
"client",
"browser"
],
"homepage": "https://www.stacktracejs.com",
"repository": {
"type": "git",
"url": "git://github.com/stacktracejs/stacktrace.js.git"
},
"dependencies": {
"error-stack-parser": "^2.0.1",
"stack-generator": "^2.0.2",
"stacktrace-gps": "^3.0.2"
},
"devDependencies": {
"browserify": "^13.3.0",
"colors": "^1.1.2",
"del": "^3.0.0",
"es6-promise": "^3.1.2",
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-coveralls": "^0.1.4",
"gulp-jshint": "^1.12.0",
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^1.12.0",
"gulp-uglify": "^1.5.1",
"jasmine": "^2.7.0",
"jasmine-ajax": "^3.2.0",
"jasmine-core": "^2.7.0",
"jscs": "^2.9.0",
"jsdoc-dash-template": "^1.2.0",
"json3": "^3.3.2",
"karma": "^1.7.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "^1.0.1",
"karma-ie-launcher": "^1.0.0",
"karma-jasmine": "^1.1.0",
"karma-jasmine-ajax": "^0.1.13",
"karma-opera-launcher": "^1.0.0",
"karma-phantomjs2-launcher": "^0.5.0",
"karma-safari-launcher": "^1.0.0",
"karma-sauce-launcher": "^1.1.0",
"karma-spec-reporter": "^0.0.31",
"run-sequence": "^1.1.2",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0"
},
"bugs": {
"url": "https://github.com/stacktracejs/stacktrace.js/issues"
},
"main": "./stacktrace.js",
"files": [
"LICENSE",
"CHANGELOG.md",
"README.md",
"stacktrace.js",
"stacktrace-js.d.ts", // <===========
"dist/"
],
"types": "./stacktrace-js.d.ts", // <===========
"typings": "./stacktrace-js.d.ts", // <===========
"scripts": {
"test": "gulp test",
"prepublish": "gulp dist"
}
}r3nya commented
👍
Btw, types or typings … need to select only one.
Note that the "typings" field is synonymous with "types", and could be used as well.