Skip to content

Commit

Permalink
feat: enhance types (#18)
Browse files Browse the repository at this point in the history
* feat: enhance types

* docs: fix JSDoc parameter alignment

* chore: upgrade to TS 5.0

* fix: generic parameters

* fix: all type errors

* chore: fix indentation of comments

* chore: collapse comments

* fix: remove .ts file

* Check-in type declaration file

This is checked-in to source control include manual revisions documenting overloaded functions, due to a suspected upstream bug in TypeScript.

See: microsoft/TypeScript#53350

* Remove extra param tags

* feat: add typescript

* refactor: convert get-path to typescript

* feat: enhance types

add TypeScript

* chore: upgrade to TS 5.0

* fix: generic parameters

* chore: collapse comments

* Check-in type declaration file

This is checked-in to source control include manual revisions documenting overloaded functions, due to a suspected upstream bug in TypeScript.

See: microsoft/TypeScript#53350

* feat: convert to TypeScript

* fix: apply @aduth's suggestions

* chore: remove unnecessary type assertion

* chore: apply @aduth's review suggestions

---------

Co-authored-by: Andrew Duthie <[email protected]>
  • Loading branch information
johnhooks and aduth authored Mar 25, 2023
1 parent 531f6fc commit 0e48077
Show file tree
Hide file tree
Showing 13 changed files with 1,170 additions and 4,049 deletions.
12 changes: 8 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"presets": [
[ "@babel/env", {
"modules": false
} ]
"@babel/preset-typescript",
[
"@babel/env",
{
"modules": false
}
]
],
"env": {
"test": {
"presets": [ "@babel/env" ]
"presets": ["@babel/preset-typescript", "@babel/env"]
}
}
}
12 changes: 3 additions & 9 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
{
"root": true,
"extends": ["eslint:recommended", "prettier"],
"plugins": ["prettier"],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"extends": "@aduth/eslint-config",
"env": {
"es6": true,
"browser": true,
"mocha": true,
"node": true
},
"rules": {
"prettier/prettier": "error"
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": "error"
}
}
3 changes: 3 additions & 0 deletions mocha-setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import register from '@babel/register';

register({ extensions: ['.ts'] });
Loading

0 comments on commit 0e48077

Please sign in to comment.