Simple example of how to use the builders and namedTypes in Typescript.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 194
- Avg merge
- 22h 43m
- Merged PRs (30d)
- 10
Description
Being new to Typescript I'm having a lot of problems trying to figure out how to use ast-types. I have been using ast-types with plain nodejs by following the example on the docs.
example
```nodejs
var n = require("ast-types").namedTypes;
var b = require("ast-types").builders;
var fooId = b.identifier("foo");
```
However, when I try to use it on Typescript I can't seem to figure out how to get the builders and namedTypes imported with Typescript.
I've tried these combinations
```nodejs
#This example only exports the types.
import {Builders, NamedType} from "ast-types"
#I tried this combination to get the builders, and no luck.
import * as astTypes from "ast-types"
console.log(astTypes.builders)
```
I really just want a simple easy 2-5 line example that shows me how to use ast-types in Typescript as I'm already doing it on Nodejs.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.