Skip to content

Commit

Permalink
chore: add TS
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha committed Sep 25, 2024
1 parent 14886e8 commit 8483c05
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.nyc_output
dist
dist
lib
56 changes: 55 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,21 @@
"node": ">=6.0.0"
},
"scripts": {
"prepublish": "tsc",
"clean": "rm -rf coverage node_modules",
"cover": "nyc mocha -- --ui tdd",
"lint": "eslint etc/ lib/ test/ \"etc/scripts/**\"",
"perf": "node --expose-gc ./etc/scripts/perf etc/schemas/*",
"test": "mocha --ui tdd --reporter dot"
},
"devDependencies": {
"@types/node": "^22.7.1",
"benchmark": "~2.1.4",
"eslint": "^8.30.0",
"mocha": "^10.2.0",
"nyc": "~15.0.0",
"tmp": "^0.1.0"
"tmp": "^0.1.0",
"typescript": "^5.6.2"
},
"author": {
"name": "Matthieu Monsch",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/platform.js → src/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ function getHash(str, algorithm) {
module.exports = {
getHash,
debuglog: util.debuglog
};
};
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/types.js → src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -3015,7 +3015,7 @@ function isJsonBuffer(obj) {
*
* @param path {Array} Passed from hook, but unused (because empty where this
* function is used, since we aren't keeping track of it for effiency).
* @param val {...} The object to reject.
* @param val {any} The object to reject.
* @param type {Type} The type to check against.
*
* This method is mostly used from `_write` to signal an invalid object for a
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"outDir": "./lib",
"allowJs": true,
"target": "es5",
"strict": true
},
"include": [
"./src/**/*"
]
}

0 comments on commit 8483c05

Please sign in to comment.