- 運営しているクリエイター
#JavaScript
Define type for specific property of interface in TypeScript
Sometimes, I face a case that I want to define a type for a specific property of an interface already defined in a library in TypeScript. For instance, there's a case like below. // an index.d.ts in a libraryexport interface Category { id: