Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to TypeScript #6

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Migrate to TypeScript #6

wants to merge 10 commits into from

Conversation

Hellzed
Copy link

@Hellzed Hellzed commented Aug 13, 2019

This is a 1:1 migration of sepa.js to TypeScript (from plain Javascript).
Rollup is introduced as the required bundler.

DONE:

  • basic conversion to TypeScript syntax (to review, I recommend diffing the original 'lib/sepa.js' and the new 'lib/sepa.ts'),
  • as a nice extra, it actually exports Sepa.Document, Sepa.PaymentInformation and Sepa.Transaction, so if you don't want to use the original procedural API to build the SEPA document, you don't have to.

TODO:

  • split the single file into smaller, more manageable modules,
  • export consistent interfaces/types,
  • use setters to validate data as it's added,
  • add more type hints,
  • improve the build step (build bothe CJS and ESM modules, add a minified version with a sourcemap?).

KNOWN ISSUES:

  • works in Node, but probably not in browsers (not tested), so it's not equivalent (yet) to the publicly available lib sepa.js.

When outstanding issues are fixed, let's publish this to our private NPM repo.
@moutard The SEPA abstraction interfaces defined in Spendesk server are even better, but I'm not sure yet how to add them on top of this).

@Hellzed Hellzed requested review from moutard and bj0rge August 13, 2019 15:55
@bj0rge bj0rge assigned Hellzed and unassigned bj0rge Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants