MCPcopy Create free account
hub / github.com/SplootCode/splootcode / register

Method register

packages/language-web/types/js/import.ts:72–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70 }
71
72 static register() {
73 const typeRegistration = new TypeRegistration()
74 typeRegistration.typeName = IMPORT
75 typeRegistration.deserializer = ImportStatement.deserializer
76 typeRegistration.properties = []
77 typeRegistration.childSets = {
78 source: NodeCategory.ModuleSource,
79 specifiers: NodeCategory.DeclaredIdentifier,
80 }
81 typeRegistration.layout = new NodeLayout(HighlightColorCategory.KEYWORD, [
82 new LayoutComponent(LayoutComponentType.KEYWORD, 'import'),
83 new LayoutComponent(LayoutComponentType.CHILD_SET_TOKEN_LIST, 'source'),
84 new LayoutComponent(LayoutComponentType.CHILD_SET_TREE, 'specifiers', ['values']),
85 ])
86
87 registerType(typeRegistration)
88 registerNodeCateogry(IMPORT, NodeCategory.Statement)
89 registerAutocompleter(NodeCategory.Statement, new Generator())
90 }
91}

Callers

nothing calls this directly

Calls 3

registerTypeFunction · 0.90
registerNodeCateogryFunction · 0.90
registerAutocompleterFunction · 0.90

Tested by

no test coverage detected