MCPcopy Create free account
hub / github.com/coder/guts / interfaceDecl

Function interfaceDecl

typescript-engine/src/index.ts:100–116  ·  view source on GitHub ↗
(
  modifiers: readonly modifierKeys[] | readonly ts.Modifier[] | undefined,
  name: ts.Identifier | string,
  typeParameters: ts.TypeParameterDeclaration[] | undefined,
  heritageClauses: ts.HeritageClause[] | undefined,
  fields: ts.TypeElement[]
)

Source from the content-addressed store, hash-verified

98}
99
100export function interfaceDecl(
101 modifiers: readonly modifierKeys[] | readonly ts.Modifier[] | undefined,
102 name: ts.Identifier | string,
103 typeParameters: ts.TypeParameterDeclaration[] | undefined,
104 heritageClauses: ts.HeritageClause[] | undefined,
105 fields: ts.TypeElement[]
106): ts.InterfaceDeclaration {
107 const node = ts.factory.createInterfaceDeclaration(
108 modifiers?.map((m) => modifier(m)),
109 identifier(name),
110 typeParameters, // Generics
111 heritageClauses, // Inheritance
112 fields // Fields
113 );
114 printer.printNode(ts.EmitHint.Unspecified, node, resultFile);
115 return node;
116}
117
118export function arrayType(node: ts.TypeNode): ts.ArrayTypeNode {
119 return ts.factory.createArrayTypeNode(node);

Callers 1

InterfaceMethod · 0.85

Calls 2

modifierFunction · 0.85
identifierFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…