valantic / vue-template

A custom Vue.js boilerplate based on webpack.
MIT License
7 stars 4 forks source link

Feature/#338 Replaces TS interfaces with TS type #343

Closed BeneRichi closed 10 months ago

BeneRichi commented 10 months ago

Pull request

This PR changes the type 'interface' to the regular 'type' and updates the syntax when one type extends another type in the whole styleguide.

Ticket

338

Browser testing

http://localhost:5173/

Checklist

Review/Test checklist

BeneRichi commented 10 months ago

@patric-eberle Yesterday, I made more changes, especially in this commit, following your suggestions. Please check it out: 2d434aeaf36323d5b569c91177e723f5eff86eef

BeneRichi commented 10 months ago

Regarding your question:

When I replace 'interface' with 'type', I have an issue saying "Duplicate identifier 'RouteMeta'.ts(2300) vue-router.d.ts(623, 26): 'RouteMeta' was also declared here."

I wasn't sure about renaming these type definitions because it seems like some of them aren't used in our app but are more related to Vue's internal stuff.

Maybe you can take a look yourself at: src/setup/styleguide/routes.ts

patric-eberle commented 10 months ago

Regarding your question:

When I replace 'interface' with 'type', I have an issue saying "Duplicate identifier 'RouteMeta'.ts(2300) vue-router.d.ts(623, 26): 'RouteMeta' was also declared here."

I wasn't sure about renaming these type definitions because it seems like some of them aren't used in our app but are more related to Vue's internal stuff.

Maybe you can take a look yourself at: src/setup/styleguide/routes.ts

@BeneRichi please note, that your investigation is correct for scenarios, where external interfaces need to be extend but for out own stuff, this is not true. I replaced unneeded interfaces by myself. Please double check to see the changes.

Your additional changes are fine. You can merge after double checking my changes.