stampit-org / stamp

Stamps - better OOP model
https://stampit.js.org
MIT License
25 stars 3 forks source link

[WIP] Typescript continues... #78

Open PopGoesTheWza opened 4 years ago

PopGoesTheWza commented 4 years ago

@koresar resuming work on this repo... still unfinished

Something (minor) is probably wrong for my latest pushes aren't linked to my GitHub profile...

koresar commented 4 years ago

Hey @PopGoesTheWza I've just pushed a commit to this branch with my improvements on the TS typings. Tell me if that's not OK.

Next thing I'm thinking - add TS annotations to the object instances created from stamps with help of generics. (I might fail here.)

PopGoesTheWza commented 4 years ago

Hello, I hope you're fine. I've been a hell of a lot busy with family, work and contributing to sindre's Got.

I want to get back on stampit's TS asap though not yet sure when. Meanwhile I gained more experience with TS typing which I intend to put in good use here. ;)

koresar commented 4 years ago

I added generics to the @stamp/types package. Would need to test thoroughly before committing.

PopGoesTheWza commented 3 years ago

@koresar I committed changes:

koresar commented 3 years ago

I looked the changes. I like everything you do! Questions.

  1. Can we kill all eslint related configuration now?
  2. AFAIK in monorepos one should not have same devDependency copied over and over in every package.json. It's enough to have one xo in the root package.json
PopGoesTheWza commented 3 years ago
  1. Can we kill all eslint related configuration now?

Eslint is now only needed by check-compose package (which is likely not worth converting to TS IMHO) so we have several options:

  1. lazily drop eslint and have no linting on check-compose
  2. move Eslint configuration from root to check-compose package
  3. enable XO linting on check-compose (and addressing linting issues)
  1. AFAIK in monorepos one should not have same devDependency copied over and over in every package.json. It's enough to have one xo in the root package.json

Agreed, this workaround is redundant/cumbersome/ugly. I just didn't find another setup to enable Xo hints in vscode while editing lerna packages. Not sure how to address this.

Maybe investigate this https://github.com/SamVerschueren/vscode-linter-xo/issues/58

PopGoesTheWza commented 3 years ago

@koresar FYI, I am heavily into refactoring the type system. I hope to have it done within a week.

koresar commented 3 years ago

@koresar FYI, I am heavily into refactoring the type system. I hope to have it done within a week.

No worries. Looks great so far. Tell me if you need something. E.g. merging to master or whatever.

PopGoesTheWza commented 3 years ago

@koresar if one can provide simple to complex examples, preferably covering all packages... to tests/verify both typing e execution. ;)

koresar commented 3 years ago

The examples are here: https://github.com/stampit-org/stamp/tree/master/packages/check-compose Both complex and simple.

Also, here are some examples for "@stamp/it" package only: https://github.com/stampit-org/stampit/tree/master/test