Skip to content

Commit 5c97439

Browse files
committed
[New] add types
1 parent 98b86ce commit 5c97439

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

index.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
declare function hasStrictMode(): boolean;
2+
3+
export = hasStrictMode;

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict';
22

3+
/** @type {import('.')} */
34
module.exports = function hasStrictMode() {
45
return !this;
56
};

package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"prepublish": "not-in-publish || npm run prepublishOnly",
1010
"pretest": "npm run lint",
1111
"lint": "eslint --ext=js,mjs .",
12+
"postlint": "tsc && attw -P",
1213
"tests-only": "nyc tape 'test/**/*.js'",
1314
"test": "npm run tests-only",
1415
"posttest": "npx npm@\">= 10.2\" audit --production",
@@ -37,15 +38,19 @@
3738
},
3839
"homepage": "https://github.com/inspect-js/has-strict-mode#readme",
3940
"devDependencies": {
41+
"@arethetypeswrong/cli": "^0.17.3",
4042
"@ljharb/eslint-config": "^21.1.1",
43+
"@ljharb/tsconfig": "^0.2.3",
44+
"@types/tape": "^5.8.1",
4145
"auto-changelog": "^2.5.0",
4246
"encoding": "^0.1.13",
4347
"eslint": "=8.8.0",
4448
"in-publish": "^2.0.1",
4549
"npmignore": "^0.3.1",
4650
"nyc": "^10.3.2",
4751
"safe-publish-latest": "^2.0.0",
48-
"tape": "^5.9.0"
52+
"tape": "^5.9.0",
53+
"typescript": "next"
4954
},
5055
"auto-changelog": {
5156
"output": "CHANGELOG.md",

tsconfig.json

+9
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)