ComponentDriven / csf

Component Story Format is an open standard for UI component examples based on JavaScript ES6 modules.
https://www.componentdriven.org/
MIT License
836 stars 47 forks source link

Allow loaders to be synchronous or void #71

Closed kasperpeulen closed 11 months ago

kasperpeulen commented 11 months ago

Allow loaders to be synchronous or void. Also turned some types into interfaces, as it is more performant, and allows for module augmentation.

I think this doesn't need runtime changes, as Object.assign accepts undefined, and non promises can also be awaited:

image

📦 Published PR as canary version: 0.1.2--canary.71.cad875c.0
:sparkles: Test out this PR locally via: ```bash npm install @storybook/csf@0.1.2--canary.71.cad875c.0 # or yarn add @storybook/csf@0.1.2--canary.71.cad875c.0 ```

Version

Published prerelease version: v0.1.2-next.0

Changelog #### 🐛 Bug Fix - Allow loaders to be synchronous or void [#71](https://github.com/ComponentDriven/csf/pull/71) ([@kasperpeulen](https://github.com/kasperpeulen)) - Move `types` condition to the front [#69](https://github.com/ComponentDriven/csf/pull/69) ([@Andarist](https://github.com/Andarist)) #### Authors: 2 - Kasper Peulen ([@kasperpeulen](https://github.com/kasperpeulen)) - Mateusz Burzyński ([@Andarist](https://github.com/Andarist))
shilman commented 11 months ago

:rocket: PR was released in v0.1.2 :rocket: