Accessing the Schema of a Struct Property in TypeScript
How can I get the schema of a property of a struct?
// In another project, only access to CanvasQuoteSettings
export class CanvasQuoteSettings extends Schema.Class<CanvasQuoteSettings>(
"CanvasQuoteSettings",
)({
instructions: Schema.Array(DrawInstruction),
}) {}
// Separate project:
export const CanvasWorkerMarco = Schema.TaggedStruct("ceapp/CanvasWorkerMarco", {
instructions: CanvasQuoteSettings['instructions'], // <--- how to do this?
canvas: Schema.instanceOf(OffscreenCanvas),
})// In another project, only access to CanvasQuoteSettings
export class CanvasQuoteSettings extends Schema.Class<CanvasQuoteSettings>(
"CanvasQuoteSettings",
)({
instructions: Schema.Array(DrawInstruction),
}) {}
// Separate project:
export const CanvasWorkerMarco = Schema.TaggedStruct("ceapp/CanvasWorkerMarco", {
instructions: CanvasQuoteSettings['instructions'], // <--- how to do this?
canvas: Schema.instanceOf(OffscreenCanvas),
})