bijoutrouvaille / fireward

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

Support Hyphens in Type Keys #30

Closed glumb closed 4 years ago

glumb commented 4 years ago

I need to validate locales as keys in my types and therefore use hyphenated type keys.

type LocalizedFieldLocales = {
  default?: string
  en?: string
  de?: string
  'en-us'?: string // this fails
}

When using the hyphenated key en-us, fireward fails with type 'LocalizedFieldLocales' is missing definition. Nor single or double quotes work.

bijoutrouvaille commented 4 years ago

@glumb There is now a fix in https://github.com/bijoutrouvaille/fireward/pull/31. If you can install from source, you can use it now, along with all the v1.6 goodies. Installing from source is easy, and I can help you if you get stuck.

In any case, because 1.6 has so many changes, it seems best to hold off on releasing it until a little more testing is done.

bijoutrouvaille commented 4 years ago

1.6.0 is now available on all release channels. Thanks for reporting the issue!