Fix type errors related to siyuan.config (#10724)

* 🎨 Improve the type definition of `siyuan.config`

* 🐛 Fix type errors related to `siyuan.config`

* 💄 `types/config.d.ts`

* 🐛 Fix type errors related to `siyuan.config`
This commit is contained in:
Yingyi / 颖逸 2024-03-25 09:33:22 +08:00 committed by GitHub
parent 433c0b6dde
commit 6b2ac5e630
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 692 additions and 306 deletions

View file

@ -451,7 +451,7 @@ export abstract class Constants {
plugin: {},
};
public static readonly SIYUAN_EMPTY_LAYOUT: Record<string, unknown> = {
public static readonly SIYUAN_EMPTY_LAYOUT: Config.IUiLayout = {
hideDock: false,
layout: {
"direction": "tb",
@ -482,7 +482,14 @@ export abstract class Constants {
"size": "auto",
"type": "center",
"instance": "Layout",
"children": [{"instance": "Wnd", "children": [{"instance": "Tab", "children": []}]}]
"children": [{
"instance": "Wnd",
"children": [],
// "children": [{
// "instance": "Tab",
// "children": []
// }]
}]
}, {
"direction": "tb",
"size": "0px",
@ -580,9 +587,7 @@ export abstract class Constants {
}
};
public static readonly SIYUAN_DEFAULT_REPLACETYPES: {
[key: string]: boolean;
} = {
public static readonly SIYUAN_DEFAULT_REPLACETYPES: Required<Config.IUILayoutTabSearchConfigReplaceTypes> = {
"text": true,
"imgText": true,
"imgTitle": true,