Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCooper committed Apr 23, 2024
1 parent ca3512e commit 2b8d960
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
import { ast, matchNode, pattern as p, replace, node as t, template, type Types } from '@ag-grid-devtools/ast';
import { ast, matchNode, pattern as p, replace, node as t, template } from '@ag-grid-devtools/ast';
import {
type GridApiDeprecation,
type GridApiReplacement,
} from '../../plugins/transform-grid-api-methods';

export const replacements: Array<GridApiReplacement> = [
replace(
matchNode(({ api, colKey, rowNode }) => ast.expression`${api}.getValue(${colKey}, ${rowNode})`, {
api: p.expression(),
colKey: p.expression(),
rowNode: p.expression(),
}),
matchNode(
({ api, colKey, rowNode }) => ast.expression`${api}.getValue(${colKey}, ${rowNode})`,
{
api: p.expression(),
colKey: p.expression(),
rowNode: p.expression(),
},
),
template(({ api, colKey, rowNode }) => {
return ast.expression`${api}.getCellValue(${t.objectExpression([
t.objectProperty(t.identifier('colKey'), colKey),
t.objectProperty(t.identifier('rowNode'), rowNode),
])})`;
},
return ast.expression`${api}.getCellValue(${t.objectExpression([
t.objectProperty(t.identifier('colKey'), colKey),
t.objectProperty(t.identifier('rowNode'), rowNode),
])})`;
}),
),
)
];

export const deprecations: Array<GridApiDeprecation> = [];
export const deprecations: Array<GridApiDeprecation> = [];

0 comments on commit 2b8d960

Please sign in to comment.