"Marka osobista w branży IT" - recenzja
29/04/2024
•


Using TypeScript protect us from errors already on compilation stage. However there are cases when developers disable this protection by using any or unknown. Today I will try to explain how these option differ, as well as whether it is worth using them at all.

Primitives are basic types available in TypeScript such as number string or boolean. We are using them very frequently defining our variables, objects’ properties, class fields etc. Although there are cases where primitives could make our life more difficult and we should use some more specific types.