function __cfHardenFn(fn: Function) {
Object.freeze(fn);
const prototype = fn.prototype;
if (prototype && typeof prototype === "object") {
Object.freeze(prototype);
}
return fn;
}
import { __cfHelpers } from "commonfabric";
import { pattern } from "commonfabric";
const define = undefined;
const runtimeDeps = undefined;
const __cfAmdHooks = undefined;
// FIXTURE: pattern-array-destructure-param
// Verifies: top-level array destructuring in pattern params lowers to index-based key access
// ([first]) =>
{first}
→ const first = __cf_pattern_input.key("0")
export default pattern((__cf_pattern_input) => {
const first = __cf_pattern_input.key("0");
return {first}
;
}, {
type: "array",
items: {
type: "string"
}
} as const satisfies __cfHelpers.JSONSchema, {
anyOf: [{
$ref: "https://commonfabric.org/schemas/vnode.json"
}, {
$ref: "#/$defs/UIRenderable"
}, {
type: "object",
properties: {}
}],
$defs: {
UIRenderable: {
type: "object",
properties: {
$UI: {
$ref: "https://commonfabric.org/schemas/vnode.json"
}
},
required: ["$UI"]
}
}
} as const satisfies __cfHelpers.JSONSchema);
// @ts-ignore: Internals
function h(...args: any[]) { return __cfHelpers.h.apply(null, args); }
__cfHardenFn(h);