-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(common): clean up types #73
Conversation
interface AppConfigInput { | ||
type: PluginType; | ||
appBridge?: AppBridgeConfig; | ||
auth?: AuthConfig; | ||
} | ||
|
||
interface AppConfig { | ||
type: PluginType; | ||
appBridge: AppBridgeConfig; | ||
auth: AuthConfig; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've discovered that we can have different AppConfigInput and AppConfig (output):
https://nuxt.com/docs/guide/directory-structure/app-config#typing-app-config
So we can have appBridge
and auth
being optional, but in the end, Nuxt will merge all the app configs from the layers, and provide the complete version of AppConfig.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that makes sense maybe adding a comment would help us understand this better in future? WDYT?
}, | ||
auth: { | ||
endpointPrefix: '/api/connect', | ||
initOauthFlowUrl: `/api/connect/storyblok`, | ||
successCallback: '/', | ||
errorCallback: '/401', | ||
}, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we no longer need to have full appConfig. Only things that we want to override.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great 💪 thank you for the speedy adjustments 🙏
Left one small comment.
What?
This PR does several things:
AppConfig
patch toindex.d.ts
, so that all the projects that use nuxt-base will have the same type../types
to be auto-imported