WrocTypeScript / talks

What would you like to share with the community?
11 stars 1 forks source link

(Not) enums on steroids #90

Open ssukienn opened 1 year ago

ssukienn commented 1 year ago

(Not) enums on steroids

The talk

One-sentence summary

The subjective approach of treating enum-like object dictionaries as an in-memory shared API of application dictionary like state

What's the format β€” is it a case study, a live coding session, a workshop or something else?

Case-study. Introduction to the problem space, explanation of required TS constructs, going through existing minimal implementation, small living code in playground/IDE to showcase the result.

Tell us more about the talk

  1. Brief introduction to enum shenanigans in TS and how they compile and behave (to later forget about them as they won't be used) vs const assertions.
  2. Brief discussion of problem space for managing dictionary-like state in the API, persistent layer, exposing it to the FE, pitfalls, and where I come from with it
  3. Going through TS constructs important for understanding: conditional types, mapped types, reversed mapped types, const assertion objects, satisfies operator. No deep dives, just enough knowledge
  4. Introducing the approach of creating simple or composite dictionary objects and how to work with them
  5. Limitations & possibilities

You

A few words about yourself

My name is Szymon Sukiennik and I am a software developer with various interests in different areas of the software stack, recently mainly focused on the backend, distributed systems and observability.

How can we find you on social media?

@ssukienn on Twitter or by email

Would you be willing to have a Q/A session after the talk?

Sure

Do you mind if we record the event?

Nope

Is there anything we can help you with?

Review slides, add feedback

\ \ Hey! I checked that there is already some similar talk proposal (https://github.com/WrocTypeScript/talks/issues/88). Not sure how significant the overlap would be here. Though, I use mapped/remapped types only as a tool to achieve typesafe remappings. Otherwise, my talk would focus on a subjective approach of treating enums like data in the project :) I am happy to propose something else if you think it will be too much of a conflict. Cheers!

welcome[bot] commented 1 year ago

Thanks for your contribution! One of the @WrocTypeScript/organisers will go back to you as soon as possible.

karol-majewski commented 1 year ago

Thank you for your contribution @ssukienn!

It would be a pleasure to have a talk about enums and their alternatives. There seems to be so much confusion about them amongst TypeScript programmers. This topic definitely deserves attention!

As for #88, I guess we're going to see how much the talks overlap on Wednesday ;) We can revisit the topic then and decide on the next steps if that's alright with you.

ssukienn commented 1 year ago

Definitely, I won't attend the meeting this Wednesday but happy to watch it and discuss this one at a later time πŸ‘Œ Thanks for the response!

karol-majewski commented 1 year ago

Here's the recording from yesterday.

I don't think there is too much overlap β€” the talk Mateusz gave was focused on type layer transformations rather than dictionaries as such.

Please let us know what you think πŸ™‡

ssukienn commented 1 year ago

Hi,

Huge apologies for the delay here and for not responding earlier. Recently was and am super occupied by personal matters and also related to switching roles and company.

I watched the video and it seems that the next similar meeting would take place in May/June? I'm not sure if things will stabilize enough so I can spend some time preparing it before the next one so np if s1 would like to take over a similar one. Will let you know when I would have smth ready :)

On the topic. Ye, the overlap is not that big, and actually would probably change it a little. To touch enums in bigger deep dive and explain all the confusement around using them or normal objects. Then glue it with this issue proposal which did not intend to go into enums too much.

Thanks, take care!

karol-majewski commented 1 year ago

Thanks for getting back to us πŸ™‡πŸ»

Our next meetup will probably take place around the end of June. So there is still quite some time to decide on the scope of your talk. No need to rush anything ☺️