Skip to content

Commit c888241

Browse files
committed
[New] add types
1 parent 459c612 commit c888241

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
declare function hasNativeBigInts(): boolean;
2+
3+
export = hasNativeBigInts;

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
var $BigInt = typeof BigInt !== 'undefined' && BigInt;
44

5+
/** @type {import('.')} */
56
module.exports = function hasNativeBigInts() {
67
return typeof $BigInt === 'function'
78
&& typeof BigInt === 'function'

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"prepublishOnly": "safe-publish-latest",
1111
"prepublish": "not-in-publish || npm run prepublishOnly",
1212
"lint": "eslint --ext=js,mjs .",
13+
"postlint": "tsc && attw -P",
1314
"pretest": "npm run lint",
1415
"tests-only": "nyc tape 'test/**/*.js'",
1516
"test": "npm run tests-only",
@@ -35,15 +36,19 @@
3536
},
3637
"homepage": "https://github.com/ljharb/has-bigints#readme",
3738
"devDependencies": {
39+
"@arethetypeswrong/cli": "^0.17.1",
3840
"@ljharb/eslint-config": "^21.1.1",
41+
"@ljharb/tsconfig": "^0.2.2",
42+
"@types/tape": "^5.8.0",
3943
"auto-changelog": "^2.5.0",
4044
"encoding": "^0.1.13",
4145
"eslint": "=8.8.0",
4246
"in-publish": "^2.0.1",
4347
"npmignore": "^0.3.1",
4448
"nyc": "^10.3.2",
4549
"safe-publish-latest": "^2.0.0",
46-
"tape": "^5.9.0"
50+
"tape": "^5.9.0",
51+
"typescript": "next"
4752
},
4853
"auto-changelog": {
4954
"output": "CHANGELOG.md",

tsconfig.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "@ljharb/tsconfig",
3+
"compilerOptions": {
4+
"target": "ES2021",
5+
},
6+
"exclude": [
7+
"coverage"
8+
]
9+
}

0 commit comments

Comments
 (0)