INNER CODE UNIT · TypeScript

transformParameter

dotnet-websharper/core · src/compiler/WebSharper.TypeScriptParser/app.ts:181

function transformParameter(p: ts.ParameterDeclaration): TSParameter {
  return {
    Name: p.name.getText(),
    Type: transformType(p.type)
  }
}

function simpleType(x: string): TSSimpleType {
  return {
    Kind: 'simple',
    Type: x
  }
}

function unhandled(x: ts.Node, ctx: string) {
  throw Error(`Unhandled SyntaxKind for ${ctx}: ${x.kind} '${x.getText()}' in ${x.getSourceFile().fileName}`);
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…