prune-parameter-types READMEThis extension makes the typescript functions to be more reusable. It examines the function parameters. In scenarios where a function requires a large type, resembling a polymorphic or union type, but only needs to check certain fields. Benfits
How it Works:This extension simplifies the process of examining function parameters, especially in cases where functions require large types but only need to verify certain fields. It uses typescript parser to detect access or function call to the parameter name then create Pick type as Parameter new type. UsagePut cursor on Function name you want its parameters to get pruned. Then in command pallet type:
Enjoy! |