Skip to content

prototype

原型模式 - 通过复制现有对象来创建新对象。

使用示例

typescript
import { createPrototype } from 'zcw-shared/functions/patterns/prototype'

const prototype = createPrototype({ name: 'Default' })
const clone = prototype.clone()