bijoutrouvaille / fireward

A concise and readable language for Firestore security rules, similar to Firebase Bolt.
MIT License
238 stars 4 forks source link

Unable to use array of custom types #16

Closed meizon closed 4 years ago

meizon commented 4 years ago

If I create the following:

type Session = {
  dayOfWeek: number
}

type Booking = {
  sessions: Session[]
}

The rules that get generated incorrectly check that sessions is of type Session and not an array of Session.

It works as expected if I use string[] or number[]

bijoutrouvaille commented 4 years ago

Bug confirmed. Thank you for the report. I should have some time tonight to work on it.

bijoutrouvaille commented 4 years ago

Should be fixed in 1.4.1, which is now available on NPM and other official channels.

meizon commented 4 years ago

Thank you for your rapid work on this! I will check it out.