UNPKG

@jahed/firebase-rules

Version:

A type-safe Firebase Real-time Database Security Rules builder.

14 lines (13 loc) 562 B
import type { RuleDataSnapshot } from "./types.ts"; /** * Creates a representation of a Firebase RuleDataSnapshots for use in rules. * * Note that `val()` is not type-specific so it's not available. Use `isString`, * `isNumber`, etc. to apply rules to `val()`. * * `data.isString(val => lessThan(val.length, 100))` is the same as * `data.isString() && data.val().length < 100`. * * https://firebase.google.com/docs/reference/security/database#ruledatasnapshot_methods */ export declare const createRuleDataSnapshot: (name: string) => RuleDataSnapshot;