When working with ag-grid
, I often find myself creating multiple CellRenderer
s. One recurring issue is having to remember the parameters and types required by each specific CellRenderer
. Is there a way to leverage TypeScript's capabilities to provide type hints for cellRendererParams
? This would greatly enhance the coding experience.
For those unfamiliar, ag-grid cellRenderParams are structured as key-value pairs like this:
{
field: 'colour',
cellRenderer: ColourRenderer,
cellRendererParams: {
colourName: 'yellow',
opacity: 0.9
}
}
I wish my editor could offer hints indicating that ColourRenderer
requires two parameters - colourName
and opacity
, with types string
and number
respectively. Thank you!
Note: I am using the most recent version of ag-grid with Angular 9.