MCPcopy Create free account
hub / github.com/Easy-Editor/EasyEditor / createDocument

Method createDocument

packages/core/src/project/project.ts:141–148  ·  view source on GitHub ↗
(schema?: RootSchema)

Source from the content-addressed store, hash-verified

139
140 @action
141 createDocument(schema?: RootSchema) {
142 const doc = new Document(this, schema)
143 this.documents.push(doc)
144 this.documentsMap.set(doc.id, doc)
145
146 this.designer.postEvent(DOCUMENT_EVENT.ADD, doc)
147 return doc
148 }
149
150 @action
151 removeDocument(idOrDoc: string | Document) {

Callers 2

loadMethod · 0.95
openMethod · 0.95

Calls 2

setMethod · 0.65
postEventMethod · 0.45

Tested by

no test coverage detected