Skip to content

Commit b47f967

Browse files
authored
♻️ 改良代码 - 加 as const (#1207)
1 parent 55a6e93 commit b47f967

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/pages/options/routes/ScriptList/hooks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export function useScriptDataManagement() {
186186
});
187187
});
188188
},
189-
};
189+
} as const;
190190

191191
const unhooks = [
192192
subscribeMessage<TScriptRunStatus>("scriptRunStatus", pageApi.scriptRunStatus),

src/pages/options/routes/Setting.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function Setting() {
8383
badge_text_color: setBadgeTextColor,
8484
script_menu_display_type: setScriptMenuDisplayType,
8585
editor_type_definition: setEditorTypeDefinition,
86-
};
86+
} as const;
8787
const unhooks = [
8888
subscribeMessage<TKeyValue<SystemConfigKey>>(
8989
SystemConfigChange,

src/pages/store/AppContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const AppProvider: React.FC<AppProviderProps> = ({ children }) => {
8181
setAppColorTheme(theme);
8282
setColorThemeState(theme);
8383
},
84-
};
84+
} as const;
8585

8686
const unhooks = [subscribeMessage<ThemeParam>("onColorThemeUpdated", pageApi.onColorThemeUpdated)];
8787
return () => {

0 commit comments

Comments
 (0)