Skip to content

Commit 831563c

Browse files
authored
[Fix] Set MLCEngineConfig.logLevel optional in config.ts (#439)
Follow up from #427 to prevent the following type issue introduced on `v0.2.39`: <img width="1328" alt="image" src="https://github.com/mlc-ai/web-llm/assets/418083/3b2d028f-71af-4e77-a779-e4176225b92a"> This issue fails type-checking [[reference](https://github.com/felladrin/MiniSearch/actions/runs/9298738476/job/25591213310?pr=356)] and forces users to define the `logLevel` config. But in fact, `logLevel` already has a default value and was intended to be an optional parameter. This PR fixes it.
1 parent e720f2a commit 831563c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export interface MLCEngineConfig {
105105
appConfig?: AppConfig;
106106
initProgressCallback?: InitProgressCallback;
107107
logitProcessorRegistry?: Map<string, LogitProcessor>;
108-
logLevel: LogLevel;
108+
logLevel?: LogLevel;
109109
}
110110

111111
/**

0 commit comments

Comments
 (0)