decpk.hashnode.devExploring the power of Record<K, V> in TypeScriptIn Javascript almost everything is an object like Arrays, functions, Date, RegExp Promise etc. You categorise objects into 2 types: With Known Properties: You know properties or methods upfront before even declaring it. Unknown Properties: You do n...Apr 29, 2024路2 min read
decpk.hashnode.devUtility types in TypescriptIn this series we are going utility types in Typescript which are commonly used. This will help us to perform common transformation. Below are the list of utility types we are going to cover in this series: Record<KeyType, ValueType> Partial<Type> ...Apr 20, 2024路2 min read
decpk.hashnode.devtypeof type operator in Typescripttypeof operator is used to get type of (I'd prefer to say Shape of) operand. If you want to learn about typeof in reference to Javascript then you can visit typeof operator in javascript. Syntax of typeof operator in Typescript Typescript typeof oper...Apr 6, 2024路3 min read
decpk.hashnode.devtypeof operator in JavascriptDo you actually know how to use typeof in Javascript?Do you now what are typeof operator capabilities? Well, we are going to explore typeof in depth. 馃挕 Do you know typeof is not specific to Typescript. It was already an operator in Javascript. ty...Apr 6, 2024路4 min read
decpk.hashnode.devOptional chaining in depthTLDR; Optional chaining (?.) prevents runtime errors when accessing properties or methods of potentially null or undefined objects by short-circuiting the expression and returning undefined instead. It's an abstraction over null or undefined checks a...Mar 23, 2024路8 min read