swup / fragment-plugin

A swup plugin for dynamically replacing containers based on rules 🧩
https://swup-fragment-plugin.netlify.app
MIT License
16 stars 1 forks source link

Optimize types #29

Closed hirasso closed 1 year ago

hirasso commented 1 year ago

Export type Rule for easier typing of the plugin option rules

Before:

const rules: FragmentPluginOptions["rules"] = [
  //...
]

After:

const rules: Rule[] = [
  //...
]