Skip to content
Discussion options

You must be logged in to vote

Hi,

There are two ways to define presentation rules:

  1. As a .json file. In this case error and type checking are done by your editor, assuming that you have specified the $schema attribute pointing to @bentley/imodeljs-common/Ruleset.schema.json.
  2. As a TS/JS object in code. In this case error and type checking is done by TS type checking system.

Either way, if you have error / type checking disabled, there's nothing that prevents you from specifying excessive attributes to any rule - they're simply ignored.

I see in your example you're defining the rules in TS. To enable type checking, specify the type of object you're creating:

import { Ruleset } from "@bentley/presentation-common";

const 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shenshengyi
Comment options

Answer selected by shenshengyi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants