Back Send feedback to ilkka.kuivanen@me.com

(Mostly) Typescript templates

I noticed I have gotten used to write some pieces of code in certain way for reason or another. Sometimes the focus is in the specific pattern, sometimes it's in the formatting and cosmetics. This collection of templates aims to work as a memory-refreshener paste-board. Also, I think it's fun to have a way to document what I actually think is the canonical way to do it (in my opinion).

Usage: Copy snippets, find and replace TODOs.

(Just) class

Singleton class

Explicit singleton class

Event bus

Singleton module

Module with explicit init

Factory function

Proxy