Utility Type (+MappedType)
1. RecordMaps all keys to the specified type (it is a mapped type)So you can't have either home or about missingtype Page = "home" | "about"; type Pa
K extends keyof T / keyof typeof 사용예제
While working on the project, I researched something that I had seen once before, but hadn't bothered to check properly. I'm a little embarrassed to a
Determinable Union Types
I use one type, but there were cases where this type is used as A in some cases and B in some casesIt is very inconvenient because if you create a typ
In JavaScript, does an object guarantee the order of its values?
(Output of the example source code)The correct answer is that objects do not guarantee the order of valuesSo if you need to guarantee the order, you s
What is npx (the difference between npm and npx)
After running npx, it can be seen that the npm package is emptyWhen installing tailwindcss, there was the following cmd, and I wondered what is npx, s
FormTags
(Example 1)Personally, I didn't use the Form tag to send data to the serverBut there are many powerful features provided by HTML, so it's good to use
For the Reduce function
In a nutshell, the reduce function allows you to use map,filter, and map functions at the same timeIt is flexible because you can set the return value
Difference between npm install and npm ci
I found out in a project while developing with an acquaintanceIf a package.json file and a package-lock.json file exist when initially setting up a pr
About Package.json and Package-lock.json
In a nutshell, it looks like this:package.json is the version range of packages to install andpackage-lock.json is the version of the packages actuall
Difference between any and unknown
It is better to use unknown rather than anyanyAllows any typeDoes not raise compiler warnings// The any example below does not raise any compiler warn
About keyof / typeof
TypeofAn operator that converts data to a type as shown belowGeneric data → Convert to a generic typeObject data → Convert to an object's type to the
About package version management of npm
version configurationversion mainly consists of Major (major version), Minor (minor version), and Patch (patch version), representing three types of u