Skip to content
Snippets Groups Projects
Unverified Commit 79ad04dd authored by Alberto Gasparin's avatar Alberto Gasparin Committed by GitHub
Browse files

Convert loot-core to TS p1 (#841)

Part 1 of the conversion. Mostly renaming js to ts and making sure
things make still sense. Added also handy TS ESLint rules.

In order to support the various .web/.electron/... I ended up adopting
`index.d.ts` as pattern to share type definition. Let me know if that
makes sense for you too. Right now the function type definition is
duplicated, but the solution will be importing from `index.d.ts` and
using `const fn: FnDef = () => ...` that way we can keep all variants in
sync from a single type file.

Such rewrite however is better done in another PR otherwise we risk
confusing git and loosing history (rename + too many changes). Another
thing that might do in the next PR is convert all files to ESModules, as
things get confusing between CJS exports, ESM default/named and TS adds
extra complains.
parent 405a92e9
No related branches found
No related tags found
No related merge requests found
Showing
with 61 additions and 22 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment