fix typing of app value for npm check (#7883)
This commit is contained in:
@@ -152,7 +152,8 @@
|
||||
console.log('app', app)
|
||||
let result: { kind: Kind; path: string }[] = []
|
||||
if (app.raw_app) {
|
||||
for (const runnable of Object.values(app.value.runnables as Record<string, Runnable>)) {
|
||||
const rawAppValue = app.value as { runnables?: Record<string, Runnable> }
|
||||
for (const runnable of Object.values(rawAppValue.runnables ?? {})) {
|
||||
if (isRunnableByPath(runnable)) {
|
||||
if (runnable.runType == 'script') {
|
||||
result.push({ kind: 'script', path: runnable.path })
|
||||
|
||||
@@ -128,8 +128,9 @@
|
||||
}
|
||||
sendUserToast('App restored from browser storage', false, actions)
|
||||
app_w_draft.value = stateLoadedFromLocalStorage
|
||||
files = app_w_draft.value.files as any
|
||||
runnables = app_w_draft.value.runnables as any
|
||||
const rawValue = app_w_draft.value as any
|
||||
files = rawValue.files as any
|
||||
runnables = rawValue.runnables as any
|
||||
redraw += 1
|
||||
} else if (app_w_draft.draft) {
|
||||
extractRawApp(app_w_draft.draft)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
let can_write = $derived(canWrite(page.params.path ?? '', app?.extra_perms ?? {}, $userStore))
|
||||
function getRunnables(app: AppWithLastVersion) {
|
||||
return (app?.value?.runnables ?? {}) as Record<string, Runnable>
|
||||
return ((app?.value as any)?.runnables ?? {}) as Record<string, Runnable>
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user