const ... as const 
-
-
-
Palindrom-Driven Development
- Još 1 odgovor
Novi razgovor -
-
-
This is an awesome tip! I make a weekly TypeScript tip (every Wednesday evening) would you mind if I tagged this tweet in one of them?
-
Thanks! And I won't mind it at all :)
Kraj razgovora
Novi razgovor -
-
-
Not that I would do this. But does it work like this as well? const a = <const>{}
- Kraj razgovora
Novi razgovor -
-
-
Would it work for arrays?
-
Yes! :)
- Još 1 odgovor
Novi razgovor -
-
-
„Because const assertions are merely syntactical sugar for typing a particular declaration as a set of read-only properties with literal values, it’s still possible to mutate references within function bodies.“https://www.sitepoint.com/compile-time-immutability-in-typescript/ …
-
"Despite Immutable<T> being a manually defined type, there are ongoing discussions to introduce DeepReadonly<T> to TypeScript, which has more refined semantics."
- Još 2 druga odgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.
· writes about
