MCPcopy Create free account
hub / github.com/NetEase/tango / constructor

Method constructor

packages/core/src/models/service-module.ts:42–58  ·  view source on GitHub ↗
(workspace: IWorkspace, props: IFileConfig)

Source from the content-addressed store, hash-verified

40 }
41
42 constructor(workspace: IWorkspace, props: IFileConfig) {
43 super(workspace, props, false);
44 this.name = getModuleNameByFilename(props.filename);
45 this.update(props.code, true, false);
46
47 makeObservable(this, {
48 _serviceFunctions: observable,
49 _baseConfig: observable,
50 _code: observable,
51 _cleanCode: observable,
52 serviceFunctions: computed,
53 baseConfig: computed,
54 cleanCode: computed,
55 code: computed,
56 update: action,
57 });
58 }
59
60 _analysisAst() {
61 const { imports, services, baseConfig } = traverseServiceFile(this.ast);

Callers

nothing calls this directly

Calls 2

getModuleNameByFilenameFunction · 0.90
updateMethod · 0.45

Tested by

no test coverage detected