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

Function typeParameterDeclaration

typescript-engine/src/index.ts:142–154  ·  view source on GitHub ↗
(
  modifiers: readonly modifierKeys[] | readonly ts.Modifier[] | undefined,
  name: ts.Identifier | string,
  type?: ts.TypeNode,
  defaultType?: ts.TypeNode
)

Source from the content-addressed store, hash-verified

140}
141
142export function typeParameterDeclaration(
143 modifiers: readonly modifierKeys[] | readonly ts.Modifier[] | undefined,
144 name: ts.Identifier | string,
145 type?: ts.TypeNode,
146 defaultType?: ts.TypeNode
147): ts.TypeParameterDeclaration {
148 return ts.factory.createTypeParameterDeclaration(
149 modifiers?.map((m) => modifier(m)),
150 identifier(name),
151 type,
152 defaultType
153 );
154}
155
156export function unionType(nodes: ts.TypeNode[]): ts.UnionTypeNode {
157 return ts.factory.createUnionTypeNode(nodes);

Callers

nothing calls this directly

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…