Prefabs
Last updated
import type { Builder } from '../../../src/controls/Builder'
import type { SchemaDict } from '../../../src/csuite'
import type { MediaImageL } from '../../../src/models/MediaImage'
import type { OutputFor } from './_prefabs'
// add an explicit type
// HINT: you don't have to type that manually, vscode can write it for you
export type UI_Mask = X.XChoice<{
noMask: X.XGroup<SchemaDict>
mask: X.XGroup<{
image: X.XImage
mode: X.XEnum<'LoadImageMask.channel'>
invert: X.XBool
grow: X.XNumber
feather: X.XNumber
preview: X.XBool
}>
}>
// and add explit return type to your function
// VVVVV
export function ui_mask(): UI_Mask {
const form: Builder = getCurrentForm()
return form.choice({
appearance: 'tab',
icon: 'mdiDominoMask',
label: 'Mask',
default: 'noMask',
// box: { base: { hue: 20, chroma: 0.03 } },
items: {
noMask: form.group(),
mask: form.group({
collapsed: false,
label: false,
items: {
image: form.image({}),
...
/resources/app/extensions/node_modules/typescript/lib/tsserver.js# if you use the default vscode tsserver.js
code /Applications/Visual\ Studio\ Code.app/Contents/resources/app/extensions/node_modules/typescript/lib/tsserver.js
#or if you use the local tsserver.js
code ./node_modules/typescript/lib/tsserver.js
{
//...
"typescript.tsserver.log": "normal",
"typescript.tsserver.enableTracing": true,
//...
}bun src/perfs/monitorVSCodePerfs.ts