refactor: plugin.tsの型を修正する (#10027)

* refactor:plugin内のすべての関数にreturn typeを設定

* fix:pluginContextsから取得できない場合は早期リターンする

* fix:valueがstring以外の時は早期リターンする

* fix:valueが取得できる時以外は早期リターンする

* fix:pluginに型をつける

* fix:絞り込みをassertStringに変更

* fix:修正漏れ

* fix:valToJsからvalueを取得するように変更
This commit is contained in:
KokiSakano
2023-03-01 15:19:20 +09:00
committed by GitHub
parent c34e7e6e08
commit 830fabef12
2 changed files with 54 additions and 21 deletions

View File

@@ -287,12 +287,15 @@ export const defaultStore = markRaw(new Storage('base', {
const PREFIX = 'miux:' as const;
type Plugin = {
export type Plugin = {
id: string;
name: string;
active: boolean;
config?: Record<string, { default: any }>;
configData: Record<string, any>;
token: string;
src: string | null;
version: string;
ast: any[];
};