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

RFC: TypeScript version bump + Type enhancements #356

Closed
sammys opened this issue Oct 25, 2022 · 4 comments
Closed

RFC: TypeScript version bump + Type enhancements #356

sammys opened this issue Oct 25, 2022 · 4 comments

Comments

@sammys
Copy link

sammys commented Oct 25, 2022

I've got a branch implementing types that make IntelliSense give suggestions. Here's a screenshot of SelfAware implemented using these types.

Screenshot 2022-10-28 at 16 34 48

It would require a version bump to TypeScript 4. How does everyone feel about this?

There are only a small number of changes to existing code required in compose/index.ts to make these types possible and I'm pretty sure this won't introduce any breaking changes for existing code since it's types only. If there are any compile problems then they will be easy to fix.

I'm proposing to do the following sequence of PRs if everyone is on board:

  1. If I remember right, @koresar mentioned the most recent package releases were incorrect so I'd like to correct that. If something does need correcting then we probably ought to release new packages after this PR
  2. (optional – will submit a PR for everyone to play with) Switch from Lerna to PNPM workspace... I've been using PNPM workspaces for my own projects and I'm happy to contribute my project structure. The structure builds both ESM & CJS and it supports test driven development and debugging. ref: Lerna is Officially Dead. Long Live Monorepos Update repo + code to use lerna 6.x along with bumping TypeScript, eslint, prettier to latest versions and getting npm audit to pass
  3. Provide ES6 Module build #352
  4. Patching the compose package with additional types. Can alternatively put them into another package if anyone thinks that would be better. After this PR I reckon we can release packages for everyone to use while the next PR is finalised
  5. Use the new types in the other (not-compose) packages in the monorepo.

The new types will differentiate a generic Stamp from a Stamp that has a defined descriptor as you see in the screenshot. I've not been able to decide on a name for that differentiating type. I could do with some opinions. Here is my short list in no particular order:

  1. ComposedStamp
  2. InferableStamp
  3. DefinedStamp
@koresar
Copy link
Member

koresar commented Oct 26, 2022

I FEEL SUPER PUMPED!!!

I'd give you access to stampit docs (stampit.js.org) too if needed.

@sammys
Copy link
Author

sammys commented Oct 27, 2022

Sweet! Definitely will need to document this stuff as it requires coding in a particular way such as using as const for composers and initializers.

OP updated with some more information that I didn't have time to write up when I posted it. Please review and comment.

@sammys
Copy link
Author

sammys commented Jan 9, 2023

Enough time has passed for people to comment so I'm pressing ahead with a few changed goals. Main one is to continue using lerna converting the repo to use NPM workspaces. I've added a task list to the OP. PR for task 1 below

@sammys
Copy link
Author

sammys commented Jan 10, 2023

Moved to stamp issue queue

@sammys sammys closed this as completed Jan 10, 2023
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

No branches or pull requests

2 participants