diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..27b8c60 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,7 @@ +declare class SemanticReleaseError extends Error { + public code?: string; + public details?: string; + constructor(message?: string, code?: string, details?: string); +} + +export = SemanticReleaseError; diff --git a/package.json b/package.json index a496dbf..7bd8bdb 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "xo": "^0.23.0" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/semantic-release/error#readme", "keywords": [ @@ -30,6 +31,7 @@ ], "license": "MIT", "main": "index.js", + "typings": "index.d.ts", "nyc": { "include": [ "index.js"