TypeScript

951 readers
1 users here now

founded 2 years ago
MODERATORS
26
 
 

Today I'm sharing a little trick that I like to use to make switch statements cleaner and more type-safe. Happy to hear other ideas!

27
 
 

DBOS Cloud, a transactional serverless computing platform, made possible by a revolutionary new operating system, DBOS, that implements OS services on top of a distributed database. We’ve used this new architecture to build a novel TypeScript transactional programming environment that enhances applications with automatic statefulness, transactionality, observability, and cyber-resilience. This makes fault-tolerant cloud-native application development much simpler and faster.

28
31
Announcing TypeScript 5.4 (devblogs.microsoft.com)
submitted 1 year ago by mac to c/typescript
29
10
Announcing TypeScript 5.4 RC (devblogs.microsoft.com)
submitted 1 year ago by mac to c/typescript
30
15
Announcing TypeScript 5.4 Beta (devblogs.microsoft.com)
submitted 1 year ago by mac to c/typescript
31
32
8
Remeda (github.com)
submitted 1 year ago by lorefnon to c/typescript
 
 

Modern utility toolbelt - rapidly evolving, type safe and esm friendly out of the box. No mutations.

33
8
typia (typia.io)
submitted 1 year ago by lorefnon to c/typescript
 
 

Typia is a transformer library supporting:

  • Super-fast Runtime Validators
  • Enhanced JSON functions
  • Protocol Buffer encoder and decoder
  • Random data generator
34
35
 
 

When developing APIs or writing integration solutions, we often fetch data from multiple sources and combine them together. This requires quite a bit of boilerplate even if you use utility libraries like lodash.

This library aims to be provide a simple type-safe utility that makes the task of combining multiple collections simpler using an intuitive association API.

You may find this API to be reminiscent of association APIs found in ORMs. However, collection-joiner is completely agnostic about how these collections are obtained - so you could for example, fetch a list of users from a database, a list of departments from another service, a list of roles from a key value store and merge them into a single hierarchy when constructing a response.

36
-5
OO awkward (self.typescript)
submitted 1 year ago by thepiggz to c/typescript
 
 

addEventListener accept function references rather than objects with expected methods like handleEvent

setTimeout and setInterval array map, filter, reduce, forEach, etc. promise then, catch, finally

bind awkward

closures

what say v8? hidden classes

fully init objects give me more perf tips

37
 
 
38
39
11
submitted 1 year ago by lysdexic to c/typescript
40
41
7
Announcing TypeScript 5.3 RC (devblogs.microsoft.com)
submitted 1 year ago by mac to c/typescript
42
43
 
 

I have googled this and even got to the second page, and there does not seem to be any kind of consensus.

As far as I can tell, it's a bad idea because it creates code you don't see and accepts inputs that you wouldn't want. And yet, many people seem to like them more than, say, const unions due to being easier to refactor in bulk.

So what gives? Is this a case of IT people having very strong opinions on stuff that doesn't matter? Or is there a technical reason for or against it?

44
45
46
47
48
17
submitted 2 years ago* (last edited 2 years ago) by philnash to c/typescript
 
 

Click bait title, but this post goes into depth about using tsconfig.json correctly and across different layers of your project.

49
12
submitted 2 years ago by mac to c/typescript
50
7
TypeScript 5.3 First Look (www.totaltypescript.com)
submitted 2 years ago by mac to c/typescript
view more: ‹ prev next ›