fix(schema): return null from resolve functions

This commit is contained in:
Daniel Roe 2025-02-11 09:37:20 +00:00
parent fd22cfd651
commit 4992de433e
No known key found for this signature in database
GPG Key ID: 3714AB03996F442B
2 changed files with 4 additions and 4 deletions

View File

@ -371,7 +371,7 @@ export default defineResolvers({
* } * }
* </style> * </style>
* ``` * ```
* @type {string | boolean | undefined} * @type {string | boolean | undefined | null}
*/ */
spaLoadingTemplate: { spaLoadingTemplate: {
$resolve: async (val, get) => { $resolve: async (val, get) => {
@ -381,7 +381,7 @@ export default defineResolvers({
if (typeof val === 'boolean') { if (typeof val === 'boolean') {
return val return val
} }
return undefined return null
}, },
}, },

View File

@ -20,7 +20,7 @@ export default defineResolvers({
* builder environment types (with `false`) to handle this fully yourself, or opt for a 'shared' option. * builder environment types (with `false`) to handle this fully yourself, or opt for a 'shared' option.
* *
* The 'shared' option is advised for module authors, who will want to support multiple possible builders. * The 'shared' option is advised for module authors, who will want to support multiple possible builders.
* @type {'vite' | 'webpack' | 'rspack' | 'shared' | false | undefined} * @type {'vite' | 'webpack' | 'rspack' | 'shared' | false | undefined | null}
*/ */
builder: { builder: {
$resolve: (val) => { $resolve: (val) => {
@ -32,7 +32,7 @@ export default defineResolvers({
if (val === false) { if (val === false) {
return false return false
} }
return undefined return null
}, },
}, },