Skip to content

Commit c37130b

Browse files
theogravitypanva
andcommitted
feat: Add Typescript definitions (#184)
* feat: add Typescript definitions Co-authored-by: Filip Skokan <panva.ip@gmail.com>
1 parent 9e69145 commit c37130b

File tree

7 files changed

+950
-2
lines changed

7 files changed

+950
-2
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
node-version: 12
1818
- run: npm install
1919
- run: npm run lint
20+
- run: npx dtslint --onlyTestTsNext types
2021

2122
test:
2223
name: Node Tests + Coverage

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ standard Node.js OpenSSL.
250250

251251
#### Semver?
252252

253-
**Yes.** Everything that's [documented][documentation] is subject to
253+
**Yes.** Everything that's either exported in the TypeScript definitions file or
254+
[documented][documentation] is subject to
254255
[Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html). The rest is to be considered
255256
private API and is subject to change between any versions.
256257

@@ -268,6 +269,7 @@ results.
268269
- Added support for any additional token exchange parameters to support specifications such as
269270
Resource Indicators
270271
- Typed [errors][documentation-errors]
272+
- TypeScript definitions
271273

272274
#### How to make the client send client_id and client_secret in the body?
273275

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@
2727
"license": "MIT",
2828
"author": "Filip Skokan <panva.ip@gmail.com>",
2929
"files": [
30-
"lib"
30+
"lib",
31+
"types/index.d.ts"
3132
],
3233
"main": "lib/index.js",
34+
"types": "types/index.d.ts",
3335
"scripts": {
3436
"coverage": "nyc mocha",
3537
"lint": "eslint lib test",
@@ -50,6 +52,7 @@
5052
"devDependencies": {
5153
"@commitlint/cli": "^8.1.0",
5254
"@commitlint/config-conventional": "^8.1.0",
55+
"@types/got": "^9.6.7",
5356
"chai": "^4.2.0",
5457
"eslint": "^6.2.2",
5558
"eslint-config-airbnb-base": "^14.0.0",

0 commit comments

Comments
 (0)