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

Update README in regard to ts-interface-builder/macro #31

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zenflow
Copy link

@zenflow zenflow commented Sep 2, 2020

/cc @dsagal

});
...
```
`ts-interface-builder` offers two ways to do this:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw your other message explaining this change.

I'd like to keep the example here. You are right that it's redundant along with ts-interface-builder's documentation, but the version here is sufficient for a good number of readers, who don't have to get into further details.

How about after this paragraph, adding ### Option 1: Using the CLI with the body as before (including the command line, the example of a generated file, and how to import it), and then ### Option 2: Using the Babel macro with the body containing a link to the details, as well as a snippet of code like

import { getCheckers } from "ts-interface-builder/macro";
const {Square} = createCheckers('./foo.ts');
Square.check({size: 1}); 

ts-interface-checker is the more popular repo, so I think it's good if its README is sufficient to get people to something working.

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

Successfully merging this pull request may close these issues.

2 participants