Commit 6403757 1 parent aea271a commit 6403757 Copy full SHA for 6403757
File tree 2 files changed +21
-2
lines changed
2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -354,7 +354,7 @@ export interface ResolvedUserConfig {
354
354
* Provide a budget for each page as a numeric total score, or an object mapping the category to the score. Should be
355
355
* a number between 1-100.
356
356
*/
357
- budget : number | Record < Partial < LighthouseCategories > , number >
357
+ budget : number | Partial < Record < LighthouseCategories , number > >
358
358
/**
359
359
* Injects the required data into the client files, so it can be hosted statically.
360
360
*/
@@ -521,7 +521,11 @@ export interface ResolvedUserConfig {
521
521
export type ClientOptionsPayload = Pick < ResolvedUserConfig , 'client' | 'site' | 'lighthouseOptions' | 'scanner' | 'routerPrefix' >
522
522
& Pick < RuntimeSettings , 'websocketUrl' | 'apiUrl' >
523
523
524
- export type UserConfig = Partial < ResolvedUserConfig >
524
+ type DeepPartial < T > = {
525
+ [ K in keyof T ] ?: T [ K ] extends object ? DeepPartial < T [ K ] > : T [ K ]
526
+ }
527
+
528
+ export type UserConfig = DeepPartial < ResolvedUserConfig >
525
529
526
530
export interface RuntimeSettings {
527
531
/**
Original file line number Diff line number Diff line change
1
+ import { describe , it } from 'vitest'
2
+ import { defineConfig } from '../packages/core/src'
3
+
4
+ describe ( 'types' , ( ) => {
5
+ it ( 'cache on' , async ( ) => {
6
+ defineConfig ( {
7
+ site : 'https://unlighthouse.dev' ,
8
+ ci : {
9
+ budget : {
10
+ seo : 60 ,
11
+ }
12
+ }
13
+ } )
14
+ } )
15
+ } )
You can’t perform that action at this time.
0 commit comments