Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional structure top of code blocks #20

Open
stephenh opened this issue Nov 22, 2021 · 0 comments
Open

Add optional structure top of code blocks #20

stephenh opened this issue Nov 22, 2021 · 0 comments

Comments

@stephenh
Copy link
Owner

I.e. to enable plugins/approaches like:

function myPlugin(output: TsProtoOutput) {
  const file = output.getFile("./simple.ts");
  const foo = file.getClass("FooRpcService");
  const getFoo = foo.getMethod("getFoo");
  foo.setMethod("getFoo", code`
    ...my customization...
    ${getFoo}
    ...my customization...
  `);
  return output;
}

Not sure if it's best to have full-fledged File / Class / Function / Method types, or if something as simple as object hashes would be good enough.

@stephenh stephenh changed the title Add structure to output on top of code blocks Add optional structure top of code blocks Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant