INNER CODE UNIT · TypeScript

transformTypeElement

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

function transformTypeElement(x: ts.TypeElement): TSTypeElement {
  if (ts.getJSDocDeprecatedTag(x) != null)
    return null;
  if (ts.isMethodSignature(x))
    return {
      Kind: 'method',
      Name: x.name.getText(),
      Parameters: x.parameters.map(transformParameter),
      Type: transformType(x.type)
    }
  if (ts.isPropertySignature(x))
    return {
      Kind: 'property',
      Name: x.name.getText(),
      Type: transformType(x.type)
    }
  if (ts.isConstructSignatureDeclaration(x))
    return {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…