Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional Formatting Example priority key missing #2760

Open
dennisdotg opened this issue May 10, 2024 · 0 comments
Open

Conditional Formatting Example priority key missing #2760

dennisdotg opened this issue May 10, 2024 · 0 comments

Comments

@dennisdotg
Copy link

Hi guys!

I noticed that under the Conditional Formatting section, the example does not contain the priority key which is mandatory

// add a checkerboard pattern to A1:E7 based on row + col being even or odd
worksheet.addConditionalFormatting({
  ref: 'A1:E7',
  rules: [
    {
      type: 'expression',
      formulae: ['MOD(ROW()+COLUMN(),2)=0'],
      style: {fill: {type: 'pattern', pattern: 'solid', bgColor: {argb: 'FF00FF00'}}},
    }
  ]
})
export interface ConditionalFormattingBaseRule {
	priority: number;
	style?: Partial<Style>;
}
Type '{ type: "expression"; formulae: string[]; style: { fill: { type: "pattern"; pattern: "solid"; bgColor: { argb: string; }; }; }; }' is not assignable to type 'ConditionalFormattingRule'.
  Property 'priority' is missing in type '{ type: "expression"; formulae: string[]; style: { fill: { type: "pattern"; pattern: "solid"; bgColor: { argb: string; }; }; }; }' but required in type 'ExpressionRuleType'.ts(2322)
index.d.ts(1017, 2): 'priority' is declared here
@dennisdotg dennisdotg changed the title Conditional Formatting Example Conditional Formatting Example priority key missing May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant