MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / createDocument

Method createDocument

packages/designer/src/project/project.ts:305–310  ·  view source on GitHub ↗
(data?: IPublicTypeRootSchema)

Source from the content-addressed store, hash-verified

303
304 @action
305 createDocument(data?: IPublicTypeRootSchema): IDocumentModel {
306 const doc = new DocumentModel(this, data || this?.data?.componentsTree?.[0]);
307 this.documents.push(doc);
308 this.documentsMap.set(doc.id, doc);
309 return doc;
310 }
311
312 open(doc?: string | IDocumentModel | IPublicTypeRootSchema): IDocumentModel | null {
313 if (!doc) {

Callers 2

loadMethod · 0.95
openMethod · 0.95

Calls 2

pushMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected