Package Exports
- jsii-srcmak
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jsii-srcmak) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
jsii-srcmak
Generates jsii source files for multiple languages from TypeScript.
Usage
Say I have a TypeScript file source/index.ts:
export interface Operands {
readonly lhs: number;
readonly rhs: number;
}
export class Calc {
public add(ops: Operands): number {
return ops.lhs + ops.rhs;
}
public mul(ops: Operands): number {
return ops.lhs * opts.rhs;
}
}The following invocation will generate target/my_python_module with Calc in python:
import { srcmak } from 'jsii-srcmak';
await srcmak('source', 'target', {
pythonName: 'my_python_module'
});License
Distributed under the Apache 2.0 license.