TypeScript is a superset of JavaScript, which allows you to benefit from static-typing checks at build time. However, it still ‘transpiles’ to standard JavaScript for execution, where type checking is not enforced by the runtime and ‘duck testing’ is commonly used instead. Types are inferred, so an object can satisfy a check against an interface […]
Category: JavaScript
Pattern: “Functional String Building”
I don’t do functional programming as a rule. Maybe I should. As it is I merely flirt with it now and then. Here is one pattern that I have definitely settled on, and that I think everyone should use. Functional string building. When you finish reading this there should be no excuse for ugly old imperative […]
Can’t we all just get a Long?
Creating a database. I wish to be able to create linked data offline. I initially went for a Guid, which is mostly safe to generate in a client. But Guids present issues with indexing, unless you use the SequentialId but that needs to be generated in the database. I considered the CombGuid which improves indexing […]
npm
For a long time I have been reluctant to publish to npm. This is for a number of reasons: My code is not polished enough. I don’t consider my solutions to be desirable enough for others to use. I don’t fancy the responsibility of maintaining a package once people are dependent on it. I thought […]
Recent Comments