| 3 | type UUIDv4 = string; |
| 4 | |
| 5 | class Block { |
| 6 | id?: string; |
| 7 | type: string; |
| 8 | properties: { |
| 9 | title: string; |
| 10 | }; |
| 11 | format?: { |
| 12 | |
| 13 | }; |
| 14 | content?: string[] | []; |
| 15 | parent: string; |
| 16 | |
| 17 | constructor({ |
| 18 | type, |
| 19 | properties, |
| 20 | content = [], |
| 21 | parent, |
| 22 | } : Block) { |
| 23 | this.id = Crypto.randomUUID();; |
| 24 | this.type = type; |
| 25 | this.properties = properties; |
| 26 | this.content = content; |
| 27 | this.parent = parent; |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | const createBlock = (block: Block) => { |
| 32 | return new Block(block); |
nothing calls this directly
no outgoing calls
no test coverage detected