A Rule wrapped with a version number for storage.

Persisted rules are stored in this envelope. Currently only version: 1 exists. When new versions are introduced, the implementation is expected to upgrade older stored rules to the current shape before passing them to compile, so compile itself only ever sees the current version.

Example

const stored: StoredRule = {
version: 1,
rule: { type: 'ref', id: 'limetech.is-admin' },
};

Hierarchy

  • StoredRule

Properties

Properties

rule: Rule

The inner Rule tree.

version: 1

Schema version of the stored rule. Always 1 for now; the type widens when new versions are introduced.