nuxt-community / pwa-module

Zero config PWA solution for Nuxt.js
https://pwa.nuxtjs.org
MIT License
1.23k stars 171 forks source link

fix(types): mark module options fields as optional #420

Closed jakubmeysner closed 3 years ago

jakubmeysner commented 3 years ago

Currently trying to configure only some options for modules results in type errors when using TypeScript. This PR aims to resolve that issue by marking them as optional in the declaration files.

codecov[bot] commented 3 years ago

Codecov Report

Merging #420 (1a4fcad) into master (8a45184) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #420   +/-   ##
=======================================
  Coverage   85.28%   85.28%           
=======================================
  Files           9        9           
  Lines         367      367           
  Branches      122      122           
=======================================
  Hits          313      313           
  Misses         54       54           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8a45184...a43399c. Read the comment docs.

jakubmeysner commented 3 years ago

@pi0

pi0 commented 3 years ago

Hi @jakubmeysner thanks for PR and sorry for delay.

Would you mind using Partial<> here and here instead? These types are internally used as well and after applying defaults they are not optional.