How to use the jsii-rosetta.typeScriptSnippetFromSource function in jsii-rosetta

To help you get started, we’ve selected a few jsii-rosetta examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / jsii / packages / jsii-pacmak / lib / targets / dotnet / dotnetdocgenerator.ts View on Github external
private convertExample(example: string): string {
    const snippet = typeScriptSnippetFromSource(example, 'example');
    const translated = this.rosetta.translateSnippet(snippet, 'csharp');
    if (!translated) { return example; }
    return this.prefixDisclaimer(translated);
  }

jsii-rosetta

[![Join the chat at https://cdk.Dev](https://img.shields.io/static/v1?label=Slack&message=cdk.dev&color=brightgreen&logo=slack)](https://cdk.dev) [![All Contributors](https://img.shields.io/github/all-contributors/aws/jsii/main?label=%E2%9C%A8%20All%20Con

Apache-2.0
Latest version published 8 days ago

Package Health Score

89 / 100
Full package analysis

Similar packages